SuperCalc

URL Encoder & Decoder

Encode special characters for URLs or decode percent-encoded strings back to readable text. Supports both encodeURI and encodeURIComponent.

URL Encoder / Decoder

Encode special characters for URLs or decode encoded strings.

How it works

URL encoding (percent encoding) is defined in RFC 3986. It replaces each byte of a character with %HH, where HH is the hexadecimal byte value.

This tool offers two encoding modes: encodeURIComponent encodes a single query parameter value, encoding all special characters. encodeURI encodes a full URL while preserving structural characters like : / ? #.

Everything runs in your browser using JavaScript's built-in encoding functions. No data is sent to any server.

FAQ

What is URL encoding?
URL encoding (percent encoding) replaces unsafe characters in a URL with a percent sign followed by two hexadecimal digits. For example, a space becomes %20 and an ampersand becomes %26. This ensures URLs are transmitted correctly over the internet.
When do I need URL encoding?
Whenever you include user input in a URL, especially in query parameters. Characters like &, =, ?, #, and spaces have special meaning in URLs and must be encoded to be treated as literal data rather than URL structure.
What characters need encoding?
Reserved characters that have special meaning in URLs: : / ? # [ ] @ ! $ & ' ( ) * + , ; = and the space character. Unreserved characters (letters, digits, - _ . ~) do not need encoding.
What is the difference between encodeURI and encodeURIComponent?
encodeURI encodes a full URL, preserving characters that are part of URL structure (: / ? # etc.). encodeURIComponent encodes a single component (like a query parameter value), encoding everything except letters, digits, and - _ . ~.
What is percent encoding?
Percent encoding is the official name for URL encoding. Each byte of the character is represented as %HH where HH is the hexadecimal value. Multi-byte UTF-8 characters produce multiple percent-encoded sequences.
What are double encoding issues?
Double encoding happens when an already-encoded string is encoded again, turning %20 into %2520. This is a common bug in web applications. Always encode raw values once, and decode encoded values once.