URL Encoder & Decoder
100% private — runs on your device, never uploaded. Works offline once loaded.
Encode special characters for safe use in URLs, or decode percent-encoded strings back to readable text. Everything runs locally in your browser.
What percent-encoding actually replaces
URLs are technically restricted to a limited set of ASCII characters. Anything outside that set — spaces, ampersands, quotes, non-Latin letters, emoji — has to be represented as a percent sign followed by two hex digits representing its byte value, such as %20 for a space or %26 for '&'. Letters, digits, and a small set of 'unreserved' characters (- _ . ~) never need encoding and are left untouched, which is why a heavily encoded string can look intimidating even though most of it is just the original text passed through.
Non-ASCII characters are first converted to UTF-8 bytes, and each byte gets its own %XX sequence — so a single accented letter or emoji can expand into two, three, or four percent-encoded triplets.
Why you actually need to encode something
Reserved characters like '&', '=', and '?' have structural meaning in a URL — they separate query parameters — so if a value you're inserting happens to contain one of them unencoded, it silently breaks the URL's structure or gets parsed as a second parameter. Encoding protects against that by escaping anything that isn't safely literal.
- Passing a search query containing spaces or punctuation as a URL parameter
- Including a name with accents (e.g. 'François') or an emoji in a shareable link
- Building a redirect_uri or callback URL that itself contains another full URL as a value
- Safely inserting user-submitted text into an API request without breaking the query string
encodeURIComponent vs. encodeURI, and the double-encoding trap
JavaScript's encodeURIComponent (what this tool mirrors) escapes almost everything except unreserved characters, making it correct for encoding a single query parameter value. encodeURI is less aggressive — it leaves reserved characters like '/', '?', and '&' alone because it assumes you're encoding a whole URL, not one piece of it. A common bug is encoding a string twice: encoding an already-encoded '%20' turns the '%' into '%25', producing '%2520' — decode once and you're left with garbage, not the original text, so always check whether a string is already encoded before running it through again.
Frequently asked questions
Is my data uploaded?
No — everything happens on your device.
What gets encoded?
Spaces become %20, special characters like & and = are percent-encoded.
What exactly gets encoded and what's left alone?
Letters, digits, and - _ . ~ stay as-is; spaces become %20, and everything else — including & = ? / non-ASCII letters and emoji — gets converted to one or more %XX hex sequences.
Should I encode spaces as %20 or as a plus sign (+)?
%20 is the correct general percent-encoding for a space; '+' is a legacy convention specific to the application/x-www-form-urlencoded format used in HTML form submissions, and the two aren't always interchangeable outside that context.
What's the difference between encoding a full URL and encoding a parameter value?
Encode only the value you're inserting into a query string (equivalent to encodeURIComponent) — running full-URL encoding on an entire link would also escape the '://' and '/' separators, breaking the URL structure.
Why did decoding my string produce garbled or broken text?
This usually means the string was already decoded once, was encoded with a different character set than UTF-8, or contains a stray '%' that isn't part of a valid two-digit hex sequence.
What happens if I encode a string that's already encoded?
You get double-encoding — the literal '%' from the first pass becomes '%25' in the second — which is a common source of broken links; decode fully before re-encoding, not the other way around.
Does this handle non-ASCII characters like Chinese, Arabic, or emoji?
Yes — the tool converts them to UTF-8 bytes first and percent-encodes each byte, exactly matching how browsers encode international characters in real URLs.
Advertisement