Skip to content

URL encode & decode

Percent-encode text for URLs, or decode it back to readable text.

Updated

Mode

How to encode or decode a URL

  1. Choose Encode or Decode.
  2. Pick what you're working with: a single query value or path part, or a whole URL.
  3. Paste your text. The result appears as you type, and errors point to the exact character.
  4. Copy the result, or press Swap to check it round-trips.

Common percent-encodings

CharacterAs typedEncoded
Space(space)%20
Ampersand&%26
Equals=%3D
Question mark?%3F
Slash/%2F
Hash#%23
Plus+%2B
éé%C3%A9

Why URLs need encoding

Characters such as &, = and ? have jobs in a URL: they separate parameters and values. When one of them appears inside a value, say a search for “fish & chips”, it has to be written as a % followed by its hex code so the server reads it as text. Non-English letters are encoded the same way, byte by byte, from UTF-8.

Common uses

  • Putting a search term in a link. Encode a value such as a name with an ampersand before adding it to a query string, so it doesn't split into two parameters.
  • Reading a tracking link. Links in emails and ads are full of %20, %3D and %2F. Decode them to see the real destination and every parameter in plain text.
  • Reading form data from a log. Decode a form submission from a request log with + means space turned on to see what was actually typed.
  • A redirect URL inside another URL. Login and redirect links carry a whole address as a parameter. Encode it with Query value or path part, so its own ? and & don't break the outer link.

Questions

When should I choose “Whole URL” instead of “Query value”?

Use “Query value or path part” for a single piece you're putting into a URL, such as a search term: it escapes &, =, / and ? so they can't break the URL. Use “Whole URL” when you have a complete address and only want spaces and other unsafe characters escaped.

Why does a space become %20 and not +?

Percent-encoding writes a space as %20 everywhere. The + form comes from HTML form submissions (application/x-www-form-urlencoded). When decoding form data, turn on “+ means space”.

What does “malformed percent-encoding” mean?

A % must be followed by two hex digits, and the bytes must form valid UTF-8. A stray % (as in “100%”) or a cut-off sequence can't be decoded; the error shows the exact spot.