Encode and decode URL components instantly. Handle special characters and query strings. Free developer tool. This tool runs entirely in your browser — no data is sent to any server. It's fast, free, and works on any device.
URLs can only contain a limited set of safe ASCII characters. Special characters like spaces, ampersands, equals signs, and non-ASCII characters (like accented letters or Chinese characters) must be percent-encoded — replaced with a % followed by their hexadecimal byte values. For example, a space becomes %20, and the @ sign becomes %40. The distinction between encodeURI and encodeURIComponent matters: encodeURI encodes a complete URL, preserving slashes and colons, while encodeURIComponent encodes a component (like a query parameter value), encoding everything including those characters. This tool handles both use cases and the reverse decoding operation instantly.
Use encodeURIComponent for individual query parameter values, form data, or URL fragments. Use encodeURI when encoding a full URL — it preserves the structural characters like /, :, ?, and &.
%20 is the percent-encoded representation of a space character. The '20' is the hexadecimal ASCII code for space. Similarly, %2F = /, %3D = =, and %26 = &.
URLs have a defined syntax where certain characters have special meaning (& separates parameters, = assigns values, # marks fragments). Encoding prevents ambiguity when data contains these characters.
Yes! Sometimes URLs are double-encoded. Clicking Decode multiple times will strip each encoding layer. Watch for errors if you decode a non-encoded string.
Yes. Non-ASCII characters are first converted to UTF-8 bytes, then each byte is percent-encoded. For example, the character é becomes %C3%A9.