URL Encode / Decode

Encode special characters for URLs or decode percent-encoded strings.

Input
Result

URL Encoding Explained

URL encoding (percent-encoding) converts characters that aren't allowed in URLs into a format that can be safely transmitted. Spaces become %20, ampersands become %26, and so on. This is essential when building query strings, API requests, or any URL that contains special characters.

encodeURI vs encodeURIComponent

encodeURIComponent encodes everything except letters, digits, and a few special characters. encodeURI preserves characters that have special meaning in URLs (like : / ? # @ etc). Use encodeURIComponent for query parameter values, and encodeURI for full URLs.

← Back to all tools