URL Encoder

Encode or decode a URL or query string instantly.

Last updated: September 23, 2026

Everything runs locally in your browser nothing is sent anywhere.

Which characters need encoding, and why

URLs can only safely contain a limited set of characters letters, digits, and a handful of symbols like - _ . ~. Everything else, including spaces, ampersands (&), question marks (?), slashes (/) within a value, and non-English characters, has to be represented using percent-encoding: each byte becomes a percent sign followed by two hexadecimal digits, so a space becomes %20 and an ampersand becomes %26. This exists because certain characters already have special meaning in a URL's structure an ampersand separates query parameters, for instance so if a value contains one, it needs to be encoded or it will be misread as part of the URL's structure instead of as data.

encodeURIComponent vs. a full URL

This tool uses the same encoding as JavaScript's encodeURIComponent function, which is meant for encoding one piece of a URL like a single query parameter's value not an entire URL at once. That distinction matters because a complete URL contains characters like : / → & = that are structurally necessary and should stay unencoded, while the same characters inside a parameter's value need to be encoded so they aren't mistaken for structure. Encoding an entire URL with this tool (rather than just the parts that need it) will make it unusable, since it will also encode the slashes and colons the URL needs to work.

When would I need this?

Building a query string for an API call or a shareable link say, passing a search term or a return URL as a parameter is the most frequent use. It's also useful for decoding a URL you've received or copied that's full of %XX sequences, turning it back into its readable form so you can see what it actually says, or for troubleshooting a link that isn't working because of an unencoded special character.

What happens with non-ASCII text

Non-English characters accented letters, emoji, or non-Latin scripts are also converted to their UTF-8 byte representation and then percent-encoded, so a caf or ??→ in a URL turns into a string of %XX sequences. This is standard behavior and exactly how browsers themselves encode international characters typed into an address bar or form field.

FAQ

What's the difference between encoding a URL and a URI component?
This tool encodes text the same way encodeURIComponent does in JavaScript safe for encoding individual query parameter values. A full URL (with http:// and slashes) doesn't need those characters encoded.

Is my data sent anywhere?
No encoding and decoding both happen locally in your browser using JavaScript.

Why does a space become %20?
Because spaces aren't allowed in a URL at all percent-encoding represents the space character's byte value (20 in hexadecimal) the same way it represents any other reserved character. You may also see + used for spaces specifically inside form-submitted query strings, which is a separate, older convention.

What happens if I encode text that's already encoded?
It gets encoded again the percent signs from the first encoding pass get turned into %25 (the encoded form of a percent sign itself), which is a common mistake called double-encoding. Only encode a value once.

Does this handle emoji and accented characters?
Yes non-ASCII characters are converted to their UTF-8 byte representation and then percent-encoded, the same way a browser encodes international text typed into an address bar.

Why did decoding my text produce an error?
Decoding fails if the text contains a % that isn't followed by two valid hexadecimal digits, which happens if the text wasn't actually percent-encoded, or was cut off, or was encoded incorrectly to begin with.