URL Encode / Decode

 

About URL Encoder

URL encoding (percent-encoding) replaces characters that are not allowed or have special meaning in a URL with % followed by their UTF-8 byte values in hex — for example, a space becomes %20 and & becomes %26.

This tool uses encodeURIComponent / decodeURIComponent, which is the right choice for encoding query parameter values and path segments. Non-ASCII text such as Korean or emoji is encoded as UTF-8.

How to use

  1. Enter the text or URL component to encode, or a percent-encoded string to decode.
  2. Click Encode or Decode.
  3. Use Line-by-line to encode multiple values at once.

FAQ

Should I encode the whole URL?

Usually not. Encode each query parameter value (and path segment) separately; encoding the full URL also escapes :, /, ? and &, which breaks the URL structure.

Why does a space become %20 and not +?

%20 is the standard percent-encoding for a space. + means a space only in application/x-www-form-urlencoded form data.

What does "URIError: malformed URI" mean when decoding?

The input contains a % sequence that is not a valid UTF-8 byte sequence, such as a lone % or %E0%A4. Check that the string was encoded correctly.