URL Encoder / Decoder

Encode text for safe use in URLs or decode percent-encoded strings back to readable text. Choose component mode for query values (encodes ?, &, =, /) or full-URL mode to keep a URL's structure intact.

How it works

Component mode uses JavaScript's encodeURIComponent, which percent-encodes every reserved character — ideal for query-string values. Full-URL mode uses encodeURI, which preserves structural characters like :, /, ? and & so a whole URL stays readable. Decoding reverses either with decodeURIComponent or decodeURI.

Frequently asked questions

What's the difference between the two modes?

Component mode encodes reserved characters (? & = / #) and is right for individual parameter values. Full-URL mode leaves those intact and is right for complete URLs.

Why do spaces become %20?

URLs can't contain literal spaces. Percent-encoding replaces each unsafe byte with % followed by its hex value — a space is byte 0x20, so it becomes %20.

Does it handle non-ASCII text like Chinese or emoji?

Yes. Characters are UTF-8 encoded first, then percent-encoded byte by byte, so any Unicode text round-trips correctly.

Related tools