URL Encoder and Decoder

A URL encoder and URL decoder that shows you exactly what each encoding function does. Paste a URL or a piece of text and see the encodeURIComponent and encodeURI results side by side, so you can pick the right one for a query value or a whole address. A query-string parser splits the address into a parameter and value table, and decoding restores the original text.

encodeURIComponent output

Encodes everything except letters, digits and - _ . ! ~ * ' ( ). Use it for a single query value.

encodeURI output

Leaves URL structure characters such as : / ? & = and # alone. Use it for a whole address.

Decoded output

Query-string parameters

ParameterValue
No query string parsed yet.

How to use it

  1. Paste a full URL or a piece of text such as a search term into the input box.
  2. Press Encode to see both the encodeURIComponent and encodeURI results, or Decode to reverse percent-encoding.
  3. Compare the two encoded outputs: the one that keeps : / ? & = intact is encodeURI; the one that encodes them is encodeURIComponent.
  4. Press “Parse query string” to split the address after the ? into a table of parameter names and values.
  5. Copy the output you need. Encoding a value twice produces double encoding (%2520 instead of %20), so encode each value once.

Tips and limits

Frequently asked questions

What is the difference between encodeURI and encodeURIComponent?

encodeURI encodes a whole address but leaves : / ? & = # and similar structure characters alone. encodeURIComponent encodes those characters too, so it is for a single value that sits inside an address, such as a search term.

How do I decode a URL?

Paste the encoded address and press Decode. Percent sequences such as %20 are turned back into spaces and other characters, and + inside a query string is read as a space.

Why is my space showing as %20?

A space is not allowed raw in a URL, so encoding writes it as %20. In a query string it may also appear as +, which means the same thing there.

Can I parse a query string into parameters?

Yes. Press “Parse query string” and the part after the ? is split into rows with one parameter name and one value per row, with percent-encoding decoded.

Is my URL sent to a server?

No. Encoding, decoding and parsing all run in your browser.

FileBench runs entirely in your browser. Your url encoder and decoder input never leaves your device, is never uploaded and is never stored.