URL Decode String
Paste a URL or any percent-encoded text and read it as normal text. %20 becomes a space, %2F a slash and %C3%A9 an é, as you type. Links encoded twice, stray % signs and query parameters are handled too.
%20 → space · %2F → / · %3F → ? · %26 → & · %C3%A9 → é
https://shop.example.com/login?next=/account/orders?status=shipped&page=2&email=sam@example.com&msg=Welcome back!
Decoded 8 %-codes · 1 + sign read as a space · 129 characters → 113 characters
Query parameters (3), each decoded on its own
The query is split at each & first, so an & or = that belongs to a value stays in that value.
| Name | Value |
|---|---|
| next | /account/orders?status=shipped&page=2 |
| sam@example.com | |
| msg | Welcome back! |
Everything runs in your browser; nothing is uploaded and the link is never opened.
How to decode a URL string
URLs can only carry a small set of characters, so everything else is written as a % followed by two hex digits. This is called URL encoding or percent-encoding. Decoding turns the codes back into the characters they stand for:
- Find each
%followed by two hex digits (0–9, A–F) and replace it with that character:%20is a space,%2Fis/,%3Fis?. - Put multi-byte characters back together. Letters outside basic English take two to four codes in a row, so
%C3%A9is one é and%E2%82%ACis one €. - If the text came from a form or a search box, turn each
+into a space as well.
Everything else, such as letters, digits and - . _ ~, stays as it is. The tool above does all three steps as you type. Upper and lower case codes mean the same thing, so %2f is also a slash.
Common URL codes and what they mean
These are the codes you will meet most often in links, search URLs and redirect parameters:
| Code | Character | Code | Character |
|---|---|---|---|
| %20 | space | %3A | : |
| %21 | ! | %3B | ; |
| %22 | " | %3D | = |
| %23 | # | %3F | ? |
| %25 | % | %40 | @ |
| %26 | & | %5B %5D | [ ] |
| %27 | ' | %0A | line break |
| %2B | + | %C3%A9 | é |
| %2C | , | %C3%B1 | ñ |
| %2F | / | %E2%82%AC | € |
Any code from %00 to %7F is a single ASCII character. Codes from %C2 upward start a multi-byte character, so they always come in groups of two, three or four.
Worked example: Caf%C3%A9%20au%20lait%20%26%20cr%C3%A8me
Step 1: Decode the spaces and the ampersand
Step 2: Join the accented letters
Step 3: Read the result
Result: Café au lait & crème. Each accented letter took two codes because UTF-8 stores é and è in two bytes. If you only decode one of the pair, you get garbage, which is why the codes must be read as a group.
%20 or +: which one is a space?
Both, depending on where the text came from. In the path of a URL a space is always %20. In a query string built by an HTML form or a search box, such as ?q=summer+sale, a space is written +. A real plus sign is then sent as %2B.
The tool reads + as a space by default because most pasted strings are search and form URLs. Turn off + means space if your text is a path or a value that really contains plus signs, such as a phone number like +44. Note that some code functions keep the plus: JavaScript’s decodeURIComponent and Python’s unquote leave summer+sale unchanged (see the code below).
Why a decoded URL still looks wrong
| What you see | Why | What to do |
|---|---|---|
%20 | The text was encoded twice (%2520 → %20). | Choose All layers. |
URI malformed | A % that isn’t a code, as in “50% off”. | The tool keeps it and points it out. |
é | UTF-8 read with the wrong character set before encoding. | Repair it with UTF-8 Decode. |
& | HTML escaping, not URL encoding. | Replace & with &. |
%E9 → é | An old page that used Windows-1252 instead of UTF-8. | Read as Windows-1252 automatically. |
Links that pass through redirects, email trackers or log files are often encoded again at every step. Each layer turns the % of the one before into %25, so %2520 is a space encoded twice. When the result still has codes in it, the tool says so and offers to decode all layers. For garbled letters like é and ’, use the UTF-8 Decode tool, which repairs them.
Decoding a whole URL at once can also hide its structure: in ?next=%2Forders%3Fpage%3D2&lang=en the decoded page=2 looks like a separate parameter. Open Query parameters under the result to see each value decoded on its own, so next is /orders?page=2.
How to URL decode in JavaScript, Python, PHP, Java and C#
decodeURIComponent(s) // JavaScript: keeps +
decodeURIComponent(s.replace(/\+/g, ' ')) // JavaScript: + as space
urllib.parse.unquote(s) # Python: keeps +
urllib.parse.unquote_plus(s) # Python: + as space
rawurldecode($s); // PHP: keeps +
urldecode($s); // PHP: + as space
URLDecoder.decode(s, StandardCharsets.UTF_8) // Java: + as space
Uri.UnescapeDataString(s) // C#: keeps +
WebUtility.UrlDecode(s) // C#: + as spaceIn JavaScript, use decodeURIComponent rather than decodeURI. decodeURI is meant for whole addresses and leaves codes like %2F, %26 and %3F undecoded, so the result can look half done.
The functions also differ on a stray %: JavaScript throws “URI malformed” and Java throws an IllegalArgumentException, while Python, PHP and C# leave it as it is. Each call undoes one layer, so call it again for text that was encoded twice.
Frequently asked questions
What does %20 mean in a URL?
%20 is a space. 20 is the hex code for the space character, and the % marks it as a code. You see it because URLs are not allowed to contain real spaces.
How do I decode a URL that was encoded twice?
Decode it again, or choose All layers in the tool above, which keeps going until no codes are left. You can spot double encoding by %25 followed by two more hex digits, such as %2520 or %253A.
What happens if I paste a URL that isn’t encoded?
Nothing changes: letters, digits and normal punctuation are left as they are, and the tool says there was nothing to decode. Only % codes are changed, plus any + signs while + means space is on.
Is it safe to paste links here?
Yes. Decoding happens in your browser and nothing is uploaded. The tool never opens the link, so pasting a tracking or login link does not visit it.
Sources
- RFC 3986, section 2.1: Percent-encoding: how %-codes work
- WHATWG URL Standard: application/x-www-form-urlencoded: + as a space in form data
- MDN: decodeURIComponent(): decoding in JavaScript
- Python docs: URL quoting: unquote() and unquote_plus()
- PHP manual: urldecode: decoding in PHP
Related Tools
Build and preview Valorant crosshair settings.
Search common Vim commands.
Turn JSON rows into bar, line, or pie charts.
Convert WebP files and Base64 data in both directions.
Convert GIF files and Base64 data in both directions.
Save any GIF frame, or all frames, as JPG.