Loading tool…
Percent-encode characters that aren't allowed in URLs, or decode an encoded query string back to readable text.
Loading tool…
URL is a free, private online tool that lets you percent-encode text for safe use in URLs, or decode an encoded URL component. It runs entirely in your browser, so nothing you enter is uploaded to a server.
Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.
URL (percent) encoding replaces unsafe or reserved characters in a URL with a % followed by two hexadecimal digits. For example a space becomes %20 and an ampersand becomes %26. This keeps URLs unambiguous when they travel across the web.
Unreserved characters (letters, digits, - _ . ~) are never encoded. Reserved characters such as ? & = # / have special meaning in a URL and must be encoded when used as literal data inside a query value.
This tool uses encodeURIComponent, which encodes characters like &, = and ? — ideal for individual query-string values. Use it on each parameter, not on a whole URL.
://, ? and & that give the URL its structure.%20. In old form submissions (application/x-www-form-urlencoded) they become +. This decoder treats + as a space.URL (or percent) encoding is the mechanism that lets arbitrary text live safely inside a web address. URLs are only allowed to contain a limited set of characters, and several of those — like ?, &, =, # and space — have special structural meaning. Percent-encoding replaces any unsafe or reserved character with a % followed by its two-digit hexadecimal byte value, so a space becomes %20 and an ampersand becomes %26.
The URL standard (RFC 3986) splits characters into groups. Unreserved characters — letters, digits and - _ . ~ — never need encoding. Reserved characters such as / ? # [ ] @ ! $ & ' ( ) * + , ; = are legal but carry structural meaning, so they must be encoded when used as literal data inside a value rather than as delimiters. Everything else (spaces, accented letters, emoji) is always encoded.
JavaScript offers two functions and choosing wrongly causes subtle bugs. encodeURIComponent encodes nearly everything, including &, = and ? — use it on individual query-string values. encodeURI leaves URL-structural characters intact — use it only on a whole URL you do not want to break. This tool uses component-level encoding, which is what you want when building ?key=value pairs by hand.
Modern URLs encode non-ASCII text as its UTF-8 bytes, each byte percent-encoded. So 'é' becomes %C3%A9 (two bytes) and an emoji becomes four percent-encoded bytes. Decoding reverses this, reassembling the UTF-8 bytes into the original characters. That is why pasting a 'messy-looking' encoded URL here returns clean, readable text.
In the path portion of a URL a space is %20, but in old HTML form submissions (the application/x-www-form-urlencoded type) a space is encoded as +. This historical inconsistency trips up many developers. When decoding, this tool treats a literal + as a space, matching how form data is interpreted, so query strings copied from forms decode correctly.
You will reach for URL encoding whenever you build links with dynamic values, pass JSON or redirect URLs as query parameters, construct API requests by hand, or debug why a link 'breaks' after an ampersand. Because the whole process runs locally in your browser, it is safe to decode URLs that contain tokens or personal data.