What is URL Encoder/Decoder?

URL Encoder/Decoder converts special characters in URLs to their percent-encoded form and back. Useful when dealing with query strings, API parameters, or URLs that contain spaces or special characters.

The tool gives you four encode modes. The component mode (encodeURIComponent) escapes every reserved character including slashes and ampersands, which is what you want inside a query value. The full-URL mode (encodeURI) preserves structural characters so the whole address still parses. The form-data mode encodes spaces as + for application/x-www-form-urlencoded payloads. The RFC 3986 strict mode goes further and also escapes ! ' ( ) and *, the sub-delimiters encodeURIComponent skips, so the output is safe to drop anywhere in a spec-compliant URL. Auto-detect inspects the input for %XX sequences and picks the right direction, a Live toggle re-runs the conversion as you type, a Recursive decode toggle peels back double or triple-encoded values until nothing is left, and a comparison panel shows the same input encoded by all four modes at once.

How to use

  1. Paste a URL or text string into the input field.
  2. Click Encode to convert special characters to percent-encoded form, or Decode to convert back.
  3. Copy the result to your clipboard or use the swap button to switch input/output.

When to use

  • Building a query string by hand and needing to escape spaces, ampersands, and equals signs.
  • Reading a server log entry that's percent-encoded and turning it back into readable text.
  • Pasting a foreign-language URL with non-ASCII characters into a plain-text email without breaking.

Result

A developer encodes 'hello world&foo=bar' to 'hello%20world%26foo%3Dbar' for use in a query string parameter.

FAQ

What's the difference between encodeURI and encodeURIComponent?
encodeURI leaves structural punctuation like /, ?, &, and = untouched so the whole URL still works. encodeURIComponent escapes all of them, which is correct when the text is just one parameter value being placed after the ? in a query string.
Why does my decoded string still have %20 in it?
Either the source was double-encoded (so one round of decoding produces another encoded string and you need to decode again), or the source uses + for spaces in form-encoded data. Try decoding twice, or replace + with space before decoding.
What characters can a URL hold without encoding?
Unreserved characters: A–Z, a–z, 0–9, and the four symbols hyphen, underscore, period, and tilde. Everything else, including spaces, non-ASCII letters, and reserved syntax characters in contexts where they have no syntactic meaning, must be percent-encoded.
Will encoding the same string twice break it?
Yes. Double-encoding turns each % into %25, which then needs decoding twice to recover the original. If you're appending a value from another system that may already be encoded, decode it once first or use a flag to track its state.
Does the tool support unicode characters like Chinese or Arabic?
Yes. The browser's built-in encodeURIComponent emits the UTF-8 byte sequence for any character, then percent-encodes each byte. Decoding reverses the process, so 'café' round-trips as 'caf%C3%A9' regardless of the language.

Related Tools