Skip to content

URL Encoder & Decoder

Percent-encode or decode text for URLs, and break a URL into its parts and query parameters.

Text

For one query value or path segment. Encodes everything except A–Z a–z 0–9 - _ . ! ~ * ' ( ).

0 characters

Encoded

The result appears here as you type.

How is this calculated?
Component → encodeURIComponent (RFC 3986 unreserved characters kept) Full URL → encodeURI (reserved delimiters : / ? # [ ] @ ! $ & ' ( ) * + , ; = kept) Form → application/x-www-form-urlencoded (URLSearchParams; space → +)

Runs in your browser — nothing you enter leaves this device.

About this tool

What it does

URLs may only contain a small set of characters, so everything else — spaces, accented letters, Hindi, emoji and characters with special meanings like & and = — is percent-encoded as %XX bytes of UTF-8. This tool encodes and decodes text in the three ways the web actually uses: as a single URL component, as a whole URL, and as HTML form data. When the text is a full URL it also splits it into scheme, host, port, path, fragment and a table of query parameters, including repeated keys, so a long tracking or redirect link becomes readable.

How to use it
  1. Choose Encode or Decode.
  2. Choose the rules: Component for one value, Full URL for a complete address, or Form for form-encoded bodies where spaces are +.
  3. Paste your text. The result updates as you type, and errors point to the broken escape sequence.
  4. If you pasted a URL, read its parts and query parameters below the result.
  5. Use the swap button to feed the result back in the other direction, and copy what you need.
Limits and your data
  • Encoding a whole URL with Component rules breaks it, because / ? & and = get encoded too. Use Full URL for complete addresses and Component for values you insert into one.
  • Text that is already encoded will be encoded again (%20 becomes %2520). Decode first if you’re unsure.
  • The parts view needs a scheme such as https://; a bare “example.com/path” is not a complete URL.
  • Decoding shows text only. Percent-encoded bytes that aren’t valid UTF-8 are reported rather than guessed at.
  • Encoding, decoding and URL parsing use your browser’s built-in functions. Nothing you paste is sent or saved. URLs can carry tokens and personal data in their query strings; the parts view hides any password embedded in the URL.

Questions

What’s the difference between encodeURI and encodeURIComponent?

encodeURI assumes you’re giving it a whole URL and leaves characters that structure a URL alone. encodeURIComponent assumes one piece — a query value or a path segment — and encodes those characters too, so a value containing & or = can’t break the URL.

Should a space be %20 or +?

In a path or with encodeURIComponent, %20. In an HTML form body or a query string built by a form, + is also accepted as a space. Choose Form mode to decode + as a space.

Why do Indian-language characters turn into so many % codes?

Each character is converted to its UTF-8 bytes first, and Devanagari characters take three bytes each — so one letter becomes something like %E0%A4%95.

Can I see what a shortened or tracking link contains?

Yes for the parameters you can see: paste it and read the query table. A short link that redirects elsewhere only reveals its destination when opened, which this tool doesn’t do.