What it does
URL encoding, also called percent-encoding, writes characters that can’t appear in a URL as % and two hex digits, so a space becomes %20. This tool works with text:
- Encode writes your text as UTF-8 bytes and escapes every byte a URL can’t hold as it is, with upper-case hex.
- Decode reads every
%XXescape back as a byte, and the bytes as text. Characters that aren’t escaped are read as typed.
How to use it
- Choose Encode or Decode, then paste or type into “Your text”. Select “Try a sample” to see an example.
- The result appears next to your text and updates as you type.
- Select Swap to move the result into “Your text” and switch between Encode and Decode, for example to check that an encoded value decodes back to your text.
- Select Copy to put the result on your clipboard.
Options
- Whole URL (off) keeps the characters that give a URL its shape. Off, only
A–Z a–z 0–9 - _ . ! ~ * ' ( )stay as typed, as JavaScript’sencodeURIComponentdoes. On,; , / ? : @ & = + $ #stay too, asencodeURIdoes. It only changes encoding. - Spaces as + (off) writes a space as
+and a typed+as%2B, as web forms send them, and reads+as a space when decoding. - The tool remembers the mode and the options you chose on this device.
Good to know
- If a
%isn’t followed by two hex digits, the tool shows it with its line and column, for example%8at the end of a value that was cut short. - Escapes for bytes that don’t form UTF-8 text are reported instead of being shown as garbled characters.
- Encoding a value that is already encoded escapes its % signs again (
%20becomes%2520). Decode first if you aren’t sure.
Limits
Your text can be up to 1,000,000 characters long.
Privacy
Your text is processed on your device: encoding and decoding run in your browser, and nothing you type or paste is uploaded. Only your choices for the mode, Whole URL and Spaces as + are kept in your browser for next time.