← All tools
%20
Encoding

URL Encoder & Decoder

Encode text or full URLs into percent-encoded form, or decode them back to readable text, instantly. 100% client-side.

πŸ”’ Runs entirely in your browser β€” no data is ever sent anywhere
Mode:

When you need to encode or decode a URL

Any value placed inside a URL β€” a search query, a path segment, a value in a form submission β€” needs encoding whenever it might contain a character with special meaning to the URL format itself: a space, '&', '?', '#', or a non-ASCII character. Skip that step and the URL either breaks outright or silently gets parsed wrong (a '&' inside a value getting read as a new parameter, for instance). This tool is also useful in reverse β€” decoding a percent-encoded string from a webhook payload, a browser address bar, or a log file back into something readable.

encodeURIComponent vs encodeURI, and non-ASCII characters

This tool uses JavaScript's encodeURIComponent, which aggressively escapes almost everything except unreserved characters (letters, digits, '-', '_', '.', '~') β€” correct for encoding one query parameter or path segment, since it also escapes characters like '&', '=', and '/' that would otherwise be misread as URL structure. Its cousin encodeURI (not used here) is meant for encoding a whole URL rather than one piece of it, so it deliberately leaves those structural characters alone. Non-ASCII characters β€” accented letters, emoji, non-Latin scripts β€” are first converted to their UTF-8 byte sequence and each byte percent-encoded separately, exactly matching how a real browser encodes a URL, so an emoji becomes several %XX groups rather than one.

Frequently asked questions

When do I need to URL-encode a string?

Whenever a value is placed inside a URL β€” a query parameter, path segment, or form submission β€” and might contain reserved characters like spaces, '&', '?', or '#' that would otherwise be misinterpreted as part of the URL's structure.

What's the difference between encodeURIComponent and encodeURI?

This tool uses encodeURIComponent, which escapes nearly everything except unreserved characters β€” correct for encoding a single query parameter or path segment. encodeURI (not used here) preserves characters like '/', ':', and '?' since it's meant for encoding a whole URL, not a component of one.

Does it handle emoji and non-ASCII characters?

Yes β€” non-ASCII characters are encoded as their UTF-8 byte sequence in percent-encoded form (e.g. an emoji becomes multiple %XX groups), matching how browsers actually encode URLs.

Related Encoding tools

Bracketly is free and open-source. If this tool saved you time, consider supporting it.

β˜• Buy me a coffee