What URL encoding is
A URL may only contain a small set of characters. Others, such as spaces, accented letters, or symbols that already mean something in a URL (? & = / #), have to be written as percent codes: a % sign followed by the character's byte value in hex. This is called percent encoding or URL encoding.
Decoding turns every %XX code back into its character, and reads UTF-8 sequences such as %C3%A9 as a single letter.
Common percent codes
| Character | Code | Character | Code |
|---|---|---|---|
| Space | %20 | + | %2B |
| ! | %21 | / | %2F |
| # | %23 | : | %3A |
| $ | %24 | = | %3D |
| % | %25 | ? | %3F |
| & | %26 | @ | %40 |
Needed or all
With Encode set to Needed, the encoder keeps letters, digits and the four symbols - _ . ~ and encodes everything else. Those are the characters RFC 3986, the URL standard, says never need encoding. All also encodes - _ . and ~, for systems that expect every non-alphanumeric character as a percent code.
Encode a value, not the whole address
Encoding is meant for the pieces you put into a URL, such as a search term or a redirect address inside a query string. If you encode a complete address, its / and : are escaped too and it stops working as a link. Encode the value, then add it after the = sign.
Text encoded twice shows up as %2520 instead of %20, because the % sign itself became %25. Run the decoder twice to undo it.
Questions about URL encoding
How do I decode a URL?
Paste it into the box above with URL to Text selected. Every %XX code is turned back into its character, and + signs become spaces, as they do in form data.
What does %20 mean in a URL?
It is a space. URLs cannot contain spaces, so a space is written as % followed by its character code in hex, which is 20.
Is a space %20 or +?
Both appear. %20 is the general percent encoding and works anywhere in a URL. The + sign means a space only in query strings and form data sent by HTML forms. The decoder treats + as a space, and the encoder always writes %20.
Why do I see %2520 in a URL?
The text was encoded twice. The first pass turned a space into %20, and the second pass encoded the % sign itself as %25. Decode it twice to get the original back.
Should I encode a whole URL or just part of it?
Usually just a part, such as one query value. This encoder escapes / : ? and & as well, which is right for a value but breaks the structure of a full address.
Is my text sent to a server?
No. Encoding and decoding run in your browser with JavaScript, and nothing you paste leaves your device.