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.

What to encode

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
CharacterencodeURIComponentencodeURI
Space%20%20
!unchangedunchanged
"%22%22
#%23unchanged
$%24unchanged
%%25%25
&%26unchanged
'unchangedunchanged
(unchangedunchanged
)unchangedunchanged
*unchangedunchanged
+%2Bunchanged
,%2Cunchanged
/%2Funchanged
:%3Aunchanged
;%3Bunchanged
=%3Dunchanged
?%3Funchanged
@%40unchanged
[%5B%5B
]%5D%5D
~unchangedunchanged
é%C3%A9%C3%A9
€%E2%82%AC%E2%82%AC
😀%F0%9F%98%80%F0%9F%98%80

How to use

  1. Choose what to encode: "Parameter value / component" for a query value or path segment, or "Full URL" for a complete URL.
  2. Turn on "Form encoding" if you need the HTML form format, where spaces are written as +.
  3. Enter the text and press "Encode" or "Decode".
  4. Copy the result. "Use result as input" moves it into the input box so you can keep converting.
  5. 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.

Last updated: