URL Encoder & Decoder (Percent-Encoding)

Percent-encode or decode URLs and query strings in any language with encodeURIComponent, encodeURI or form encoding (+). Broken % sequences show the exact error position.

  • Runs in your browser (no upload)
Action

Percent-encodes everything as UTF-8 except letters, digits and - _ . ! ~ * ' ( ).

Result

Input length
37
Result length
95

How to use

  1. Choose Encode or Decode and the method (encodeURIComponent, encodeURI or form encoding).
  2. Type text or a URL; the result appears immediately.
  3. Copy the result, or use "Use the result as input and reverse" to check the round trip.

FAQ

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent also encodes / ? & = and similar characters, so use it for query values and path segments. encodeURI keeps URL delimiters, so use it for a whole URL.

What happens with a broken % sequence?

The browser's decodeURIComponent just throws an error; this tool shows the position (line and column) and the problem, including UTF-8 byte sequences that are cut off.

Is a space encoded as %20 or +?

As %20 with encodeURIComponent and encodeURI, and as + with form encoding (application/x-www-form-urlencoded).

Notes & limitations

  • What you enter is processed only on this page and is not sent to YUCTS servers.
  • Input is limited to 2,000,000 characters.
  • Only UTF-8 is supported; URLs encoded in other character sets (such as Shift_JIS) are not read correctly.
  • It does not check whether a URL is otherwise valid (for example the domain name).

Data sources