📝 Text & Content

URL Encoder / Decoder

Encode or decode URLs and query strings instantly. See results in real time — runs entirely in your browser.

How it works

URL encoding (also called percent-encoding) converts characters that are not allowed in URLs into a safe format. For example, a space becomes %20, an ampersand becomes %26, and non-ASCII characters like é become %C3%A9. This tool uses the browser's native encodeURIComponent and decodeURIComponent functions for accurate results. Everything runs locally — no data is sent to any server.

Frequently Asked Questions

What is URL encoding?
URL encoding (percent-encoding) converts special characters into a format that can be safely transmitted in a URL. For example, a space becomes %20, an ampersand becomes %26, and é becomes %C3%A9. This ensures that URLs and query strings are interpreted correctly by browsers and servers.
When should I encode a URL?
You should encode URLs when passing special characters (spaces, &, =, ?, #, +), non-ASCII characters (like é, ü, 中文), or any characters that might be interpreted as URL delimiters. This is essential when building API requests, form query strings, or sharing links with special characters.
What characters need to be encoded?
Characters that typically need encoding include: spaces (%20 or +), ampersand (%26), equals sign (%3D), question mark (%3F), hash (%23), plus (%2B), slashes (%2F), and any non-ASCII characters like accented letters, CJK characters, or emoji.
What is the difference between encodeURIComponent and encodeURI?
encodeURI encodes only characters that are not allowed in a complete URL (like spaces), but preserves :/?&= which are needed in URLs. encodeURIComponent encodes all special characters, making it suitable for encoding individual query parameter values. This tool uses encodeURIComponent which is more thorough.
Can this tool handle already-encoded strings?
Yes. The Decode function will decode percent-encoded strings. If the input is already decoded, it will remain unchanged. The tool also handles double-encoded strings — run Decode multiple times to fully decode them.
Browse all tools Base64 Encoder HTML Viewer