URL Encode / Decode

Percent-encode special characters in URLs and decode encoded URL strings. Supports both encodeURIComponent and encodeURI modes.

Original String
Encoded Output

Related Tools

Frequently Asked Questions

What is URL encoding?

URL encoding (also called percent-encoding) replaces special characters with a % followed by two hexadecimal digits. For example, a space becomes %20. This ensures URLs are valid and unambiguous.

When should I use encodeURIComponent vs encodeURI?

Use encodeURIComponent (the default) for encoding individual query parameters or path segments. Use encodeURI for encoding a complete URL — it preserves characters like /, ?, and # that have special meaning in URLs.

What characters need to be encoded?

Characters that must be encoded include spaces, !, @, #, $, &, +, ,, /, :, ;, =, ?, @, [, ], and non-ASCII characters like emoji and accented letters.

About URL Encode / Decode

Percent-encode special characters in URLs and decode encoded URL strings. Supports both encodeURIComponent and encodeURI modes.

urlencodedecodepercenturi