URL Encoder and Decoder

Percent encoding, both directions.

FREE · NO SIGN-UP · RUNS ON YOUR DEVICE

Your text stays on your device

  • 2DIRECTIONS
  • 2ENCODINGS
  • 0SIGN-UP
  • 1TAP TO COPY
Specification

URL Encoder and Decoder at a glance

Directions
Both directions
One value
Escapes separators
Whole URL
Keeps separators
Characters affected
Nine characters differ
Bad input
Position reported
Price
Free
Account required
None
Where it runs
On your device
How to

How to use URL Encoder and Decoder

  1. 1

    Choose a direction

    Choose a direction.

  2. 2

    Pick the encoding

    Pick the encoding.

  3. 3

    Copy the result

    Copy the result.

Questions

Frequently asked questions

Which encoding should I use?

Use the one-value encoding for anything going inside a query string. Use the whole-URL one only when you are encoding a complete address.

Why do the two give different answers?

They treat the characters that structure a URL differently. Escaping a slash inside a value is correct; escaping it in an address breaks the address.

My decode failed. What now?

The message says which character position starts the broken escape. A percent sign must be followed by two hexadecimal digits.

Are spaces turned into plus signs?

No. Spaces become percent twenty, which is correct for a URL path or query. Plus signs belong to form encoding, which is a different format.

Background

Two encodings, one difference

Two encodings are offered because they differ on the characters that separate a URL. One escapes them for use inside a value; the other leaves them alone.

  • Percent encoding replaces a character with a percent sign and its two-digit hexadecimal value.
  • The separators that structure a URL are exactly the characters the two encodings disagree about.
  • Encoding an already encoded string doubles the escapes, so a percent sign becomes percent twenty-five.
  • Decoding is the same in both cases, which is why only the encode side offers a choice.

Full specification

Specification of the URL Encoder and Decoder tool
DirectionsEncode and decode, chosen with one switch.
One valueEscapes the separator characters, so the result is safe inside a query value.
Whole URLLeaves the separator characters alone, so a complete address stays usable.
Characters affectedThe two differ on slash, question mark, colon, at, ampersand, equals, plus, dollar and hash.
Bad inputA broken percent escape is reported by character position, not as a trace.
PriceFree. Supported by clearly labelled ads placed outside the working area.
Account requiredNo.
Where it runsIn your browser tab. Nothing is sent anywhere.
Next step

Keep going with the same files

All developer tools: Developer tools on SPOTTOOLS