Skip to content
Jellykit

URL Encoder & Decoder

Percent-encode text as a URL component, a full URI or form data, and decode it back, with a note on what each choice escapes.

  • Runs on your device
Loading tool

About URL Encoder & Decoder

Paste text and get it percent-encoded as you type. Choose Component to make a value safe inside a query string or path segment, Full URI to tidy a whole address while keeping its slashes, question mark and ampersands, or Form to write spaces as + the way HTML forms do. A note under the result names the reserved characters in your text that the choice escapes or keeps.

Switch to Decode to turn percent-encoded text back into readable characters. Broken sequences, such as a stray % or bytes that are not UTF-8, are left as they were and pointed out instead of stopping the whole decode.

How it works

  1. Text is turned into UTF-8 bytes, and every byte outside the characters a URL may carry unescaped becomes % followed by two hexadecimal digits.
  2. Component encoding matches encodeURIComponent, Full URI matches encodeURI, and Form matches what URLSearchParams writes: only letters, digits and * - . _ stay, and a space becomes +.
  3. Decoding reads every %XX sequence back into bytes and those bytes into UTF-8 text. Invalid sequences are kept as written and counted, with the position of the first.
  4. The swap button moves the result into the input and flips the direction, for a quick round trip.

Questions

Should I use Component or Full URI?

Use Component for a piece that goes inside a URL: one query value, one path segment, a redirect address passed as a parameter. Use Full URI only for an entire address that already has its structure, where / ? & and = must keep their meaning.

Why does a space become %20 in one mode and + in another?

Both mean a space, in different places. %20 is valid everywhere in a URL. The + form comes from HTML form submissions and is understood only in query strings, which is why Decode has an option to read + as a space.

What happens to an invalid sequence such as %zz when decoding?

It is left in the result exactly as it was, and a note says how many there were and where the first one is. The rest of the text is still decoded, unlike decodeURIComponent, which gives up on the whole string.

Is there a size limit?

The input can be up to 5 MB of text. Everything is done in this page; the text is never uploaded.

Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.