url decode
Decoded in the page, so a pasted link stays yours.
The short answer
Decoding turns each % and its two hex digits back into the character it stood for, so %20 becomes a space and %C3%A9 becomes é. A % with nothing valid after it is an error rather than a guess, because guessing would quietly corrupt the text.
Turns %20 soup back into readable text. Useful when a URL has been through two systems and arrives looking like a hex dump.
The formula
% followed by two hex digits → the byte it names → UTF-8 text
Worked examples
- %20
- a space
- caf%C3%A9
- café
- %zz
- an error, not a guess
Reference table
| Escape | Character | Where it turns up |
|---|---|---|
| %20 | space | Anywhere a value had spaces |
| %2F | / | A path inside a parameter |
| %3A | : | A URL inside a URL |
| %C3%A9 | é | Any accented letter, as two bytes |
| %2B | + | Because + can also mean a space |
How to use it
- 01Paste the encoded textA whole URL or just the parameter you care about.
- 02Read the decoded versionA stray % with nothing valid after it is reported rather than guessed at.
Also searched for
Searches that land here include url decode, decode url online, percent decode, url decoder and convert %20 to space.
Reading percent-encoding
What the escapes mean
Each escape is a percent sign and the hexadecimal value of one byte. %20 is byte 32, a space. Characters outside ASCII take more than one byte in UTF-8, so they take more than one escape: é is two bytes and arrives as %C3%A9. Once you know that, a long encoded string stops being noise.
Decoding a whole URL is usually safe
Unlike encoding, where escaping the whole URL breaks it, decoding a whole URL generally just makes it readable. The exception is a URL that contains an encoded URL as a parameter: decoding once reveals it, and decoding again would destroy the inner one's own escaping.
When you should not decode
Values that are about to be used, rather than read. If you decode a parameter and then paste it back into a URL without re-encoding, anything with an ampersand in it will split into two parameters. Decode to read; keep the encoded form to send.
Questions people ask
Why does my URL contain %2520?
It has been encoded twice. %25 is the escape for the percent sign itself, so %2520 is an already-escaped %20. Decoding once gives you %20, decoding twice gives the space. Two layers of code both trying to be helpful is the usual cause.
Should a plus sign become a space?
Only in form data. In a query string built by an HTML form, + historically meant a space, and some servers still read it that way. Everywhere else a plus is a plus. This page leaves it alone, because turning every plus into a space quietly corrupts anything that legitimately contains one.
Why did it refuse to decode?
A percent sign has to be followed by two hexadecimal digits. If it is followed by anything else, or by the end of the string, the input is not valid percent-encoding and there is no safe way to guess what was meant. Truncated copies and text that has been through a chat app are the usual culprits.