dilettanteee

URL Encoder / Decoder

Percent-encode or decode a URL component or a whole URI.

Mode
Scope
Text
Output

The result appears here.

About URL Encoder / Decoder

URLs can only contain a limited set of characters, so spaces, accents and symbols must be percent-encoded before they are safe to send. This tool encodes text for use in a URL and decodes percent-encoded strings back into readable text.

How to use it

  1. Choose Encode or Decode.
  2. Pick a scope: Component for a single value such as a query parameter, or Full URI for a whole address.
  3. Paste your text or URL into the input panel.
  4. Copy the result.

Good to know

  • Component mode also encodes characters like slash, question mark, ampersand and equals, so a value cannot accidentally break the structure of the URL it sits in.
  • Full URI mode leaves those structural characters alone and only encodes what cannot appear in an address at all.
  • Decoding a string that contains a stray percent sign not followed by two hex digits will report an error.

Common questions

Which scope should I use for a query string value?

Use Component. It encodes reserved characters such as ampersands and equals signs so the value stays intact when placed after a key in a query string.

Why do spaces become %20?

A space is not allowed in a URL, so it is replaced by its percent-encoded byte value, %20. Some form encodings use a plus sign instead, but %20 is valid everywhere.