Encode or decode

Mode

For one query value or path segment. Encodes reserved characters such as & = ? / # (encodeURIComponent).

Try:

How it works

URLs may only contain a limited set of ASCII characters. Everything else (spaces, non-Latin letters, and characters with a special meaning such as & = ? #) is written as a % sign followed by the byte value in hexadecimal, using UTF-8. Decoding reverses this. Everything runs in your browser; nothing is sent to a server.

Which characters get encoded

  • Never encoded: letters A–Z a–z, digits and - _ . ~.
  • Reserved: : / ? # [ ] @ ! $ & ' ( ) * + , ; = have a meaning in URLs. Component mode encodes them; Full URL mode keeps them.
  • Everything else (spaces, quotes, non-ASCII letters, emoji) is converted to UTF-8 bytes, each written as %XX. A space becomes %20, or + in form data.

Frequently asked questions

Which mode should I use?

“Component” for a single query value or path segment: it encodes reserved characters such as & = ? / #. “Full URL” keeps those characters so a complete URL stays usable. “Form data” is like Component but writes spaces as + (application/x-www-form-urlencoded, used by HTML forms).

Why does decoding fail?

A % must be followed by two hexadecimal digits, and the decoded bytes must form valid UTF-8. The error message shows where the first invalid sequence is.

What is double encoding?

Encoding text that is already encoded turns % into %25, so %20 becomes %2520. If decoded output still contains %xx sequences, it was probably encoded twice; decode it again.

Is my input sent anywhere?

No. Encoding and decoding use the browser’s built-in functions; the text never leaves your device.