← Back

URL Encode / Decode

🔒 100% Local Processing

Output

Result will appear here...

About URL Encoding

URL encoding (also known as percent-encoding) converts characters into a format that can be transmitted over the Internet. Special characters like spaces, ampersands, and non-ASCII characters are replaced with percent signs followed by two hexadecimal digits.

encodeURI vs encodeURIComponent

encodeURI encodes a full URL but preserves characters like :, /, ?, &, = that are part of the URL structure. encodeURIComponent encodes everything, making it safe for use as a query parameter value.

URL Encoder/Decoder FAQ

What is URL encoding?

URL encoding (percent-encoding) converts special characters into a format safe for URLs. Spaces become %20, question marks become %3F, and other reserved characters get percent-encoded. This ensures URLs work correctly in all browsers and APIs.

When should I encode a URL?

Encode URLs that contain spaces, non-ASCII characters (Chinese, emoji), or reserved characters (&, ?, =, #). Always encode query parameter values before appending them to a URL.

What is the difference between encodeURI and encodeURIComponent?

encodeURI preserves URL structure characters like / ? & = #. encodeURIComponent encodes everything, including those reserved characters. Use encodeURIComponent for individual query parameter values.

Why do I see %20 in URLs?

%20 is the encoded form of a space character in URLs. Spaces are not allowed in URLs, so they must be encoded as %20 (or sometimes + in query strings).