Why URLs need encoding
URLs may only contain a limited set of ASCII characters. Letters, digits and - . _ ~ are always safe. Characters such as ? & = / # : have special meaning (they separate the path, query and fragment), and spaces, quotes, emoji or non-Latin letters are not allowed at all. To send them safely, each byte of their UTF-8 form is written as %XX.
encodeURIComponent vs encodeURI
| Function | Encodes | Use it for |
|---|---|---|
encodeURIComponent | Everything except A–Z a–z 0–9 - _ . ! ~ * ' ( ) | A single query value or path segment, e.g. a search term or a URL passed as a parameter |
encodeURI | Spaces and unsafe characters, but keeps : / ? # & = | A complete URL that should keep its structure |
The classic mistake is using encodeURI on a parameter value: an & inside the value is left alone and silently splits it into two parameters.
Common encodings
| Character | Encoded | Character | Encoded |
|---|---|---|---|
| space | %20 (or + in forms) | & | %26 |
| / | %2F | ? | %3F |
| # | %23 | = | %3D |
| é | %C3%A9 | 😀 | %F0%9F%98%80 |
%20 vs + for spaces
In the path of a URL a space must be %20. In query strings submitted by HTML forms (application/x-www-form-urlencoded) a space is written as +. This decoder treats + as a space so both styles decode correctly.
Practical uses
- Building tracking links where the destination URL is itself a parameter (
?redirect=https%3A%2F%2Fexample.com). - Reading messy URLs copied from analytics or server logs.
- Debugging double-encoding bugs, where
%20becomes%2520. If you see%25, the text was encoded twice — decode once more.
Everything runs in your browser; nothing is sent to our server. To inspect each part of a URL, try the URL Parser; to remove tracking parameters, use the Query Parameter Remover.
Frequently asked questions
What does %20 mean in a URL?
%20 is the percent-encoded form of a space character. Browsers display it as a space, but it must be sent as %20 because raw spaces are not allowed in URLs.
What is double encoding?
Double encoding happens when already-encoded text is encoded again, so % becomes %25 and %20 turns into %2520. Decode the string twice to recover the original.
Is URL encoding the same as encryption?
No. Encoding only changes the format so it is URL-safe; anyone can decode it. Never use URL encoding to hide sensitive data.
Should I encode the whole URL or just the parameters?
Encode each parameter value with encodeURIComponent. Encode a complete URL with encodeURI only when you need to keep its slashes, question mark and ampersands.
Does this tool upload my text?
No. Encoding and decoding happen entirely in your browser.

