URL Encoder / Decoder
Percent-encode, decode, or parse a query string
Everything runs in your browser. Nothing you paste is ever uploaded or stored on a server.
Put a space, an ampersand, or an accented letter straight into a URL and the request either breaks or gets read wrong. This tool converts text to and from percent-encoding as you type. You can encode one piece of a URL, like a single query value, or a whole URL that needs to keep its :/?#&= working. There's also a Query mode that splits a URL into its separate parameters. Everything happens in your browser, so pasting a token or a private link is safe.
Why URLs need encoding
URLs can only contain a certain set of characters, and a few of them, like ? & = / #, are structural. They tell the URL where the query starts, where one parameter ends and the next begins, and so on. If a value you're dropping into a URL contains one of those characters, or a space, or anything outside plain ASCII, you have to percent-encode it first. Otherwise the browser or server reads your data as part of the URL's structure and the whole thing falls apart. Percent-encoding swaps each unsafe character for a % followed by the hex value of its byte.
How percent-encoding works
First the text gets turned into bytes using UTF-8. Then any byte that isn't one of the safe "unreserved" characters (A-Z, a-z, 0-9, and - _ . ~) gets written out as %HH, where HH is that byte in hex. A plain space becomes %20. Anything outside ASCII takes more than one byte in UTF-8, so a single character can turn into several percent codes in a row.
a b → a%20b café → caf%C3%A9 (é is two UTF-8 bytes: C3 A9)
Component vs whole-URL
There are two modes here, and picking the wrong one is the classic mistake:
- Component mode escapes almost everything, including / ? # & =. Use it when you're encoding one piece of a URL, like a single query value or a path segment.
- Full-URL mode leaves those structural characters alone. Use it when you already have a complete URL and just want to fix the spaces and non-ASCII characters without breaking the URL itself.
Run a whole URL through component mode and it escapes the :// and the separators, leaving you with a mess. Run a single value through full-URL mode and it can leave characters unescaped that should have been encoded.
The + versus %20 confusion
In real percent-encoding a space is %20. But old HTML forms, the ones submitted as application/x-www-form-urlencoded, use a + for a space instead. Two different conventions from two different places. This tool uses %20. If you're decoding something that came out of a form and the spaces show up as +, swap the + back to a space before you decode.