Skip to content

URL Encoder / Decoder

Safely encode and decode URLs and URL components.

About the URL Encoder / Decoder

URLs can only safely contain a limited set of ASCII characters. Anything outside that set — spaces, accented characters, ampersands inside query values, slashes inside path segments — must be percent-encoded (also called URL-encoded) so the server interprets the URL correctly.

This tool encodes and decodes between human-readable text and percent-encoded URL text. Use it when debugging API requests, building redirect chains, escaping query string values, or decoding a captured URL into something you can read.

How it works

Encoding uses encodeURIComponent, which percent-encodes every reserved character including /, ?, &, =, and #. That makes it safe for query string values, path segments, and form data — but not for an entire URL where you want / to remain literal.

Decoding uses decodeURIComponent and reverses every %XX triplet back to its UTF-8 byte. Invalid sequences produce a clear error rather than silently mangling your text.

Privacy

URLs are encoded and decoded entirely in your browser. We never see the URLs you process — handy when they contain tokens, session IDs, or signed query strings.

Frequently asked questions

What's the difference between encodeURI and encodeURIComponent?
encodeURI assumes you're encoding a whole URL and leaves URL-structural characters like '/', '?', and '#' alone. encodeURIComponent assumes you're encoding a single value (a path segment or query value) and escapes everything reserved. Use encodeURIComponent when in doubt.
Why is '+' decoded as a space sometimes?
In query strings (the part after '?'), legacy form-encoding represents spaces as '+' and decoders restore them. In path segments and other URL parts, '+' is literal. Modern APIs increasingly use '%20' for spaces in both contexts to avoid the ambiguity.
How are non-ASCII characters encoded?
They're first converted to UTF-8 bytes, then each byte becomes a '%XX' percent-encoded pair. So 'é' (U+00E9) becomes %C3%A9, and an emoji like '🎉' becomes %F0%9F%8E%89.
Do I need to encode an entire URL string?
No — and you usually shouldn't, because that would escape the slashes and colons that give the URL its structure. Encode just the dynamic values you splice into a URL template.
Why do I see '%25' in some decoded URLs?
%25 is the encoding of the literal '%' character. If you see it, your URL was double-encoded — once when it was constructed and once more before storage or transit. Decode it twice to recover the original.

Other free utilities that pair well with this one.