URL encode and decode
Percent-encode text for URLs or decode it back. Choose between encoding a single parameter value and encoding a full URL.
For a single query value or path segment. Also encodes / ? & = #. Example: rock&roll → rock%26roll, café → caf%C3%A9
Matches HTML form submissions (application/x-www-form-urlencoded): spaces become + when encoding, and + becomes a space when decoding. Available for "Parameter value / component" only.
How common characters are encoded
| Character | encodeURIComponent | encodeURI |
|---|---|---|
| Space | %20 | %20 |
! | unchanged | unchanged |
" | %22 | %22 |
# | %23 | unchanged |
$ | %24 | unchanged |
% | %25 | %25 |
& | %26 | unchanged |
' | unchanged | unchanged |
( | unchanged | unchanged |
) | unchanged | unchanged |
* | unchanged | unchanged |
+ | %2B | unchanged |
, | %2C | unchanged |
/ | %2F | unchanged |
: | %3A | unchanged |
; | %3B | unchanged |
= | %3D | unchanged |
? | %3F | unchanged |
@ | %40 | unchanged |
[ | %5B | %5B |
] | %5D | %5D |
~ | unchanged | unchanged |
é | %C3%A9 | %C3%A9 |
€ | %E2%82%AC | %E2%82%AC |
😀 | %F0%9F%98%80 | %F0%9F%98%80 |
How to use
- Choose what to encode: "Parameter value / component" for a query value or path segment, or "Full URL" for a complete URL.
- Turn on "Form encoding" if you need the HTML form format, where spaces are written as +.
- Enter the text and press "Encode" or "Decode".
- Copy the result. "Use result as input" moves it into the input box so you can keep converting.
- The "How common characters are encoded" table at the bottom compares both modes character by character.
Notes and limits
- Input up to 2 MB.
- Text is encoded and decoded as UTF-8. Percent-encoded text in other character sets (for example Latin-1 %E9) cannot be decoded and is reported as an error.
- When decoding a full URL, escapes of delimiter characters such as %2F (/), %3F (?), %23 (#) and %26 (&) are left encoded so the structure of the URL does not change.
- The URL is never opened, fetched or shown as a link.
How it works
"Parameter value / component" follows encodeURIComponent / decodeURIComponent in JavaScript: everything except letters, digits and - _ . ! ~ * ' ( ) is encoded.
"Full URL" follows encodeURI / decodeURI: characters that structure a URL, such as : / ? # [ ] @ & = + $ , ;, are not encoded.
Form encoding gives the same result as URLSearchParams: spaces become + and ! ' ( ) ~ are encoded too. When decoding, + is read as a space.
Before decoding, the tool checks that every % is followed by two hex digits and that the bytes form valid UTF-8. Problems are reported with their position.
FAQ
When should I use "Parameter value" or "Full URL"?
Use "Parameter value / component" when building one query value, such as a search term: & and = are encoded, so symbols in the value cannot break the URL. Use "Full URL" to make an entire URL safe while keeping its structure.
Is a space encoded as %20 or +?
Normally as %20. With "Form encoding" on, it becomes +. When decoding, + is turned back into a space only with form encoding on.
What happens if I encode text that is already encoded?
Each % becomes %25, so the text is double-encoded. The tool shows a warning when the input already contains %XX sequences.
Is my input sent anywhere?
No. Conversion runs in your browser, and the URL you enter is never visited.
Related tools
Last updated: