Kitbench

URL Encoder/Decoder

URL encoding, also called percent-encoding, replaces unsafe characters in a URL with a percent sign and two hex digits. Choose Encode or Decode, pick component or full URL mode, and paste your text.

Runs in your browser. Your files and text are not uploaded.

Component: uses encodeURIComponent. Also encodes : / ? # & =, so use it for a single query value.

How to use URL Encoder/Decoder

  1. Choose Encode or Decode.
  2. Pick Component for a single value, or Full URL to keep the URL structure.
  3. Paste your text.
  4. Copy the result.

Frequently asked questions

How do I URL encode a string?

Choose Encode, keep Component mode and paste the string. Spaces become %20 and special characters are escaped.

What is the difference between component and full URL mode?

Component mode (encodeURIComponent) also encodes : / ? # & and =. Full URL mode (encodeURI) leaves them so the URL still works.

Why does decoding fail?

A % sign must be followed by two hex digits. Malformed sequences cause an error.

Related tools