Free online tool
URL Encoder / Decoder
Percent-encode URLs and query strings, or decode them back to plain text — all in the browser.
Why URLs need encoding
URLs can only safely contain a limited set of characters — letters, digits and a handful of punctuation marks. Spaces, non-Latin letters, and reserved characters like ?, & or # need to be percent-encoded so they don't confuse the browser or the receiving server. Without encoding, a search query with a space or an ampersand can silently break a link, an API call, or a tracking parameter.
When to encode vs decode
Encode when you're building a URL programmatically, embedding user input in a query string, or copying a snippet from a rich editor that may contain non-ASCII characters. Decode when you're reading a URL from a log, a shared link, or a piece of code and want to see the human-readable value hidden behind the percent-signs. This tool uses the standard encodeURIComponent and decodeURIComponent functions built into every browser.
+What's the difference between encodeURI and encodeURIComponent?
encodeURI leaves characters like : / ? # & alone because they're part of URL structure. encodeURIComponent encodes them too, which is what you want when embedding a value inside a query parameter.
+Does this handle Unicode?
Yes. Any character not in the safe set is encoded as its UTF-8 bytes in percent form (for example, é becomes %C3%A9).
Percent-encoding query strings without breaking them
URLs can only safely contain a limited set of ASCII characters, so anything else, spaces, ampersands inside a value, non-Latin characters, emoji, needs to be percent-encoded as a percent sign followed by the character's hex byte value, for example a space becomes %20 and an ampersand becomes %26.
This tool converts text to and from that encoded form so you can build links, debug a broken redirect, or read a log line full of percent signs without doing the hex math by hand.
Why encoding query parameters matters for tracking
If a campaign name or search term contains an ampersand, a plus sign, or a hash, and you paste it unencoded into a query string, the URL parser will split it into extra parameters or truncate it at the fragment marker. This is a frequent, hard-to-spot cause of broken UTM tracking and internal search analytics.
Encode the value, not the whole URL
A common error is running an entire URL, including the scheme and slashes, through percent-encoding, which turns https:// into an unusable string. Only the individual path segments or query values that contain special characters should be encoded; encode each component separately and rebuild the URL around it.
Plus sign versus %20 for spaces
In a query string, a space is conventionally written as a plus sign, but in the path portion of a URL a literal plus sign means plus, not space, and a space must be written as %20. Mixing these two conventions up is a subtle but common bug, especially when copying encoding logic from a form-submission context into a path-building context.
Double-encoding is its own failure mode
Running an already-encoded string through the encoder a second time turns %20 into %2520, since the percent sign itself gets encoded. This shows up when a URL passes through multiple systems, like a redirect service and then an analytics pixel, each of which encodes it independently, and it's usually only caught when a destination page starts returning a 404 despite the underlying URL being valid.
Non-Latin text and emoji in URLs
A product name written in Japanese or a hashtag containing an emoji still needs to travel through a URL as UTF-8 bytes, each represented by multiple percent-encoded segments, so a single character can expand into nine or more characters once encoded. This is normal and browsers decode it back to readable text in the address bar automatically, but if you're manually constructing a link or debugging one pasted from a spreadsheet, the encoded form can look far more broken than it actually is.
People also search for
- url encoder decoder
- percent encoding tool
- encode special characters in url
- url escape characters online
- utm parameter encoding
- double encoding url bug
- space to %20 converter
- query string encoding rules