URL Encoder
Interactive StudioEncode or decode URLs and query strings using percent-encoding. Instant feedback with zero server storage.
Loading tool…
About URL Encoder
URLs can only safely contain a limited set of characters — letters, digits, and a handful of symbols like - . _ ~. Everything else, including spaces, ampersands, and non-ASCII characters, has to be represented using percent-encoding: each byte outside the safe set is written as a percent sign followed by its two-digit hexadecimal value, so a space becomes %20 and "café" becomes "caf%C3%A9" once encoded as UTF-8 bytes. This tool uses encodeURIComponent and decodeURIComponent to perform that conversion in either direction.
Encoding matters most for values that get inserted into a URL's query string or path segment, since certain characters have structural meaning in a URL — & separates query parameters, = assigns a value to a key, and / separates path segments. If a value you're inserting contains one of those characters unencoded, it can be misparsed as part of the URL's structure rather than as literal data. That's why a search query like "cats & dogs" needs the ampersand escaped before it's safely embedded as a single parameter value: without encoding, it would look like two separate parameters.
This gets used for building query strings by hand, decoding a URL copied from a browser to read its actual parameter values, or debugging why a link with special characters isn't routing correctly.
How to use URL Encoder
- Choose Encode or Decode.
- Paste the text or encoded URL fragment.
- Copy the result.
Worked examples
Input: café au lait&x=1
Result: caf%C3%A9%20au%20lait%26x%3D1
Input: a b
Result: a%20b
Background
URLs may safely contain letters, digits and a few symbols. Everything else is percent-encoded: each byte is written as % followed by two hex digits. Non-ASCII characters are first converted to UTF-8, so é becomes %C3%A9.
Encode individual query values, not a whole URL. Encoding the full address would also encode the :, / and ? that give it structure.
Common mistakes
- Encoding an entire URL instead of just the parameter values.
- Double-encoding, which turns %20 into %2520.
- Treating + and %20 as always identical. + means a space only in form-encoded query strings.
Frequently Asked Questions
Frequently Paired With
Fast, local-first developer micro-tools with zero tracking or latency.
