URL Encoder / Decoder Percent-encode or decode URLs and query strings — free, instant, private.

URL Encoder / Decoder

Percent-encode or decode URLs and query strings — free, instant, private.

What is URL encoding?

URL encoding — officially called percent-encoding — converts characters that are not allowed in a URL into a safe form: a percent sign followed by two hexadecimal digits representing the character's UTF-8 bytes. A space becomes %20, an ampersand becomes %26, and non-ASCII text such as é becomes %C3%A9. This tool encodes and decodes text instantly, entirely in your browser.

How to use this tool

  1. Paste the text or URL you want to convert into the input box above.
  2. Pick a mode: Component for a single query-string value, or Full URL to keep a whole address intact.
  3. Click Encode or Decode — or leave Live on to convert as you type.
  4. Copy the result with one click.

Reserved vs unreserved characters

Common mistakes (and how to fix them)

Worked example: a URL inside a URL

Embedding one address in another, as in ?redirect=https://example.com/a?x=1&y=2, breaks because the inner ? and & are parsed as part of the outer query string. Paste just the inner address, select Component mode, and Encode produces https%3A%2F%2Fexample.com%2Fa%3Fx%3D1%26y%3D2, which travels safely as a single value. On the receiving side, Decode in the same mode restores it exactly.

Frequently asked questions

What is percent-encoding?

Percent-encoding is the standard mechanism (RFC 3986) for representing characters in a URL that would otherwise be unsafe or ambiguous. Each such character is replaced by a percent sign followed by two hexadecimal digits of its UTF-8 byte value — for example, a space becomes %20 and an ampersand becomes %26.

What is the difference between encodeURI and encodeURIComponent?

encodeURI is meant for a complete URL: it encodes unsafe characters but leaves structural characters such as : / ? & = # intact so the address still works. encodeURIComponent is meant for a single piece of data, like a query parameter value: it encodes every reserved character too, so the value cannot break the surrounding URL.

Which characters are reserved in a URL?

The reserved characters are : / ? # [ ] @ ! $ & ' ( ) * + , ; = — they have structural meanings such as separating the scheme, path, query and fragment. The unreserved characters A-Z a-z 0-9 - _ . ~ are never encoded. Everything else, including spaces and non-ASCII text, must be percent-encoded.

Is URL encoding reversible?

Yes. Decoding with decodeURIComponent (or decodeURI) restores the original text exactly, provided the percent-sequences are well-formed. If the input contains a malformed sequence such as a lone % sign, decoding fails — this tool detects that and shows a clear error instead of guessing.