A URL decoder reverses percent-encoding: every %XX sequence is turned back into the byte it represents, and the bytes are read as UTF-8 text. %20 becomes a space and %C3%A9 becomes é.
Example
https%3A%2F%2Fexample.com%2Fsearch%3Fq%3Dcaf%C3%A9%20au%20lait%26lang%3Denhttps://example.com/search?q=café au lait&lang=enWhat is URL encoding?
URLs may only contain a limited set of ASCII characters, and some of those (/ ? # & = +) have special meaning. Percent-encoding (RFC 3986) is how anything else gets in: the character is converted to UTF-8 bytes and each byte is written as % followed by two hex digits.
Two details cause most confusion:
+versus%20. In HTML form submissions (application/x-www-form-urlencoded), a space is written as+. In other parts of a URL,+is a literal plus sign. This tool treats+as a space by default. Switch the option to No (strict RFC 3986) when decoding a path or a value where+should stay.- Double encoding. If the output still contains
%25,%2Fand so on, the string was encoded twice (%25is an encoded%). Decode the output again.
Common percent-encoded characters
| Encoded | Character | Encoded | Character |
|---|---|---|---|
%20 | space | %3D | = |
%21 | ! | %3F | ? |
%22 | " | %40 | @ |
%23 | # | %2B | + |
%25 | % | %2C | , |
%26 | & | %2F | / |
%3A | : | %7E | ~ |
How to use the URL decoder
- Paste the encoded URL or query string.
- Choose whether
+means a space. Keep Yes for query strings from forms. - Read the decoded text. If it still contains
%XXsequences, decode it once more.
Decode a URL in code
console.log(decodeURIComponent("caf%C3%A9%20au%20lait")); // café au lait
// For query strings, URLSearchParams also turns + into a space
console.log(new URLSearchParams("q=caf%C3%A9+au+lait").get("q")); // café au laitfrom urllib.parse import unquote, unquote_plus
print(unquote("caf%C3%A9%20au%20lait")) # café au lait
print(unquote_plus("caf%C3%A9+au+lait")) # café au laitURL encoding at a glance
| Specification | RFC 3986 (URIs), WHATWG URL Standard, HTML form encoding |
| Format | % plus two hex digits per byte |
| Character encoding | UTF-8 |
| Space | %20, or + in form-encoded query strings |
Frequently asked questions
What is the difference between decodeURI and decodeURIComponent?
decodeURI leaves the characters that structure a URL encoded (such as %2F for / and %3F for ?), so the URL keeps its shape. decodeURIComponent decodes everything, which is what you want for a single query value. This tool behaves like decodeURIComponent.
Why do I get a "malformed percent-encoding" error?
Either a % is not followed by two hex digits, or the bytes don't form valid UTF-8. A literal % in the text should have been encoded as %25. Older systems sometimes encode in Latin-1 (%E9 for é), which isn't valid UTF-8.
Should + be decoded as a space?
In query strings that came from HTML forms, yes. In paths, and in values encoded with encodeURIComponent, no, because there a space is always %20 and + means a plus sign.
Last reviewed · found a mistake? contact@decoder.tools · view as markdown