URL Encode and Decode

  1. Choose file
  2. Set options
  3. Get result

Encoding and decoding run in your browser tab.

Component escapes reserved URL characters. Full URL keeps ; , / ? : @ & = + $ # unescaped. decodeURI leaves reserved escapes such as %2F and %3F as-is.

Percent-encode query values and paths or decode existing % sequences. Choose Component (encodeURIComponent) or Full URL (encodeURI). Decode reports incomplete escapes, invalid hex, and bad UTF-8 with a position. Runs in your tab; no upload.

Encode or decode a URL in this tab

Component mode uses encodeURIComponent. Full URL mode uses encodeURI. Decode names the position of an incomplete escape or bad hex. You can treat + as a space when the text is a form body. The work stays local.

encodeURIComponent or encodeURI

On “Encode”, “Component (parameter)” escapes a query value with encodeURIComponent. “Full URL” uses encodeURI and leaves the structural characters of a URL alone.

Decode points at the bad spot

“Decode” reports an incomplete % sequence and a bad hex code, with a position. Turn on “Treat + as space” for form bodies that use plus as a space.

How to encode or decode a URL here

  1. Press “Encode” to escape text, or “Decode” to turn percent-encoding back.

  2. Choose “Component (parameter)” for encodeURIComponent, or “Full URL” for encodeURI.

  3. On a form body, turn on “Treat + as space” so a plus becomes a space while decoding.

  4. If decode fails, the message names the position of the incomplete escape or the bad hex. Press “Copy” when the result looks right.

Percent-encoding with the mode named

  • Component is encodeURIComponent

    Use it for a parameter, where reserved characters must be escaped.

  • Full URL is encodeURI

    Use it when the string is already a URL and its structure should stay.

  • Position on a bad escape

    An incomplete % sequence is reported with a position.

  • Bad hex is located too

    A hex pair that is not valid is named at its position.

  • Plus as space, optional

    The checkbox is for form bodies, not for every URL.

  • Encoded in the tab

    The string is not uploaded to be encoded or decoded.

Questions about URL encoding

Which mode is encodeURIComponent?

Component (parameter), on the Encode tab.

Which mode is encodeURI?

Full URL.

What does decode say about a broken %?

It reports an incomplete escape and includes a position.

And a bad hex pair?

It reports that the hex is not valid, also with a position.

When should + become a space?

Turn on “Treat + as space” for a form body. Leave it off for a normal URL.

Is the string uploaded?

No. Encoding and decoding run in this tab.