Skip to content

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 → é

Decoded text
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.

Query parameters and their decoded values
NameValue
next/account/orders?status=shipped&page=2
emailsam@example.com
msgWelcome 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:

  1. Find each % followed by two hex digits (0–9, A–F) and replace it with that character: %20 is a space, %2F is /, %3F is ?.
  2. Put multi-byte characters back together. Letters outside basic English take two to four codes in a row, so %C3%A9 is one é and %E2%82%AC is one €.
  3. 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:

Common percent codes and the characters they decode to
CodeCharacterCodeCharacter
%20space%3A:
%21!%3B;
%22"%3D=
%23#%3F?
%25%%40@
%26&%5B %5D[ ]
%27'%0Aline 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

%20 → space  ·  %26 → &

Step 2: Join the accented letters

%C3%A9 → é  ·  %C3%A8 → è

Step 3: Read the result

Café au lait & crème

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

Common problems after URL decoding and how to fix them
What you seeWhyWhat to do
%20The text was encoded twice (%2520 → %20).Choose All layers.
URI malformedA % 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 space

In 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