MultiConvers

URL Encoder & Decoder

Percent-encode text for use in a query string, or decode an encoded component back to readable text.

How to use

  1. Paste a query value or path segment you want to encode, or a percent-encoded string you want to decode.
  2. Choose Encode or Decode.
  3. Copy the result. A broken % sequence shows an error instead of silently corrupting the text.

How it works

URL encoding (percent-encoding) replaces reserved and non-ASCII characters with % followed by two hex digits. A space becomes %20.

This page uses encodeURIComponent and decodeURIComponent, which encode almost every reserved character so the value is safe as a query parameter or path segment.

That is different from encodeURI, which leaves : / ? # and similar characters alone because it is meant for a full URL. Invalid sequences such as a trailing % raise an error instead of silently corrupting the string.

Formula

encode = encodeURIComponent(text)
decode = decodeURIComponent(text)
space → %20    & → %26    Unicode → UTF-8 percent bytes

Worked examples

  • Query value with spaces

    hello world hello%20world

  • Symbols

    a&b=c a%26b%3Dc

Useful notes

  • Use this for a single component, not an entire URL you still want to keep as a URL.
  • Malformed % sequences are reported, not guessed.
  • Encoding stays in your browser and is not sent to analytics.

FAQ

What is percent encoding?

A way to write characters that are not allowed raw in a URL by replacing them with % and two hex digits. A space becomes %20.

Read more: What is URL encoding?

Why not encodeURI?

encodeURI leaves URL punctuation intact. encodeURIComponent is the usual choice when you are encoding one field.

What if the encoded text is broken?

decodeURIComponent throws on invalid % sequences. This page shows that error and leaves your input unchanged.

Is the URL uploaded?

No. Encoding stays in your browser and is not sent to analytics.

Guides

Related tools

See all Utilities tools.