How to use the URL encoder
- Choose Encode or Decode.
- Choose what you are converting: a single value (for example one query parameter) or a full URL.
- Type or paste your text. The result updates as you type.
- When decoding form data, tick Treat + as a space.
- Press Copy, or Use result as input to reverse the operation.
Below, the query string parser takes a full URL or just the part after the question mark and lists every parameter in a table, already decoded. Repeated keys appear once per occurrence, in their original order.
Your text stays on your device
All encoding, decoding and parsing happen in your browser. Nothing you enter is sent to our server.
How percent-encoding works
A URL may only contain a limited set of characters. Every other character is converted to its UTF-8 bytes, and each byte is written as a percent sign followed by two hex digits. A space becomes %20, and the euro sign, which is three bytes in UTF-8, becomes %E2%82%AC.
The two modes differ in which characters they leave alone:
- Single value (encodeURIComponent) encodes everything except letters, digits and - _ . ! ~ * ' ( ). It also encodes / ? & = and #, so a value can never break the URL around it.
- Full URL (encodeURI) keeps the characters that give a URL its structure, such as : / ? & = and #, and only encodes the rest.
Worked example
Encoding the value red shoes & socks/2 as a single value gives red%20shoes%20%26%20socks%2F2. The & and / are encoded, so they stay part of the value.
Encoding https://example.com/a b?q=café as a full URL gives https://example.com/a%20b?q=caf%C3%A9. The address still works because its slashes and question mark are untouched.
Good to know
- When decoding fails, the tool names the position and the faulty sequence. For example,
100%fails at character 4 because the % is not followed by two hex digits. - In HTML form data a + means a space, but in other parts of a URL it is a literal plus. That is why the option is off by default.
- Full URL mode does not decode reserved characters such as %2F, because turning them back into / could change the meaning of the address.
- The query parser is lenient, like browsers: a broken sequence is kept as typed instead of stopping the whole list.