URL Encode / Decode
- Pick a mode: encode or decode.
- Paste or type your text.
- The result updates as you type and can be copied directly.
URLs may only contain a restricted set of characters. Anything else must be represented by a percent sign followed by the hexadecimal value of the byte, which is where the name percent-encoding comes from.
A space becomes %20, an at sign becomes %40, a slash becomes %2F. Accented characters take more than one byte in UTF-8 and produce more than one sequence: ç becomes %C3%A7.
Without that conversion, a parameter containing & or = would break the structure of the query string, and the server would read the wrong data.
This tool uses encodeURIComponent, which is the correct choice for encoding the value of a single parameter. It escapes &, =, ?, /, # and every other character that plays a structural role in a URL.
The encodeURI function is meant for a whole URL and deliberately preserves exactly those characters, because there they are legitimate separators. Using it on a parameter value lets & and = through and corrupts the query string.
Rule of thumb: a complete URL uses encodeURI; a fragment going inside a parameter uses encodeURIComponent.
Not everything is escaped: the characters ! ' ( ) * — along with - _ . ~ — are left intact by specification. Some older servers expect the first five to arrive encoded as well.
In HTML forms submitted as application/x-www-form-urlencoded, a space becomes +, not %20. These are two different conventions that coexist.
That means decoding a form query string requires swapping + for a space first. Text that contained a literal plus sign and was not encoded as %2B reaches the server as a space, a classic cause of corrupted search data.
The conversion happens in your browser; nothing is transmitted or logged.
Frequently asked questions
Two conventions. URL percent-encoding uses %20; forms submitted as x-www-form-urlencoded use +. Both are correct in their own context.
encodeURIComponent for a parameter value, which is the common case. encodeURI only for a complete, already-assembled URL where slashes and the question mark must be preserved.
Because in UTF-8 it takes two bytes, and each byte gets its own percent sequence. ç becomes %C3%A7.
You can, but it is rarely what you want. Encoding twice turns % into %25 and the value arrives at its destination with an extra layer. If you see %2520 somewhere, that is exactly the problem.
No. The conversion happens in your browser and nothing is logged.