🔗 URL Encoder Decoder

Free

Encode or decode a URL, a query string or a single value — percent-encoding (RFC 3986), + for spaces in form data, and a lenient decoder that tells you which escapes were invalid instead of throwing. Any URL is also broken into scheme, host, path, query parameters and fragment. Runs in your browser.

Encode or decode a URL ↓

🔗 URL encoder / decoder

Mode

Encoding and decoding happen with the browser's own encodeURIComponent / decodeURIComponent primitives, so what you see here is exactly what fetch() or your framework will produce.

🧩 Parsed URL

🔍 Query parameters (decoded)

📖 Every percent escape in the input

🌍 Non-ASCII characters and their UTF-8 bytes

🔗 What is percent-encoding?

A URL may only contain a small set of ASCII characters. Everything else — spaces, &, ?, Cyrillic, Chinese, emoji — has to be written as a percent-encoding: a percent sign followed by the two hex digits of the byte. A space is %20, & is %26, the ampersand-free # is %23. Multi-byte characters are encoded byte by byte in UTF-8, so (U+4E2D) becomes %E4%B8%AD and 😀 (U+1F600) becomes %F0%9F%98%80.

The rules live in RFC 3986, which also defines how the parts of a URI fit together. Two practical consequences follow from it:

📚 Reserved vs unreserved characters

Only the unreserved set may appear literally in a URL: A–Z, a–z, 0-9, -, _, ., ~. Everything else is a candidate for escaping, but implementations differ by one notch — and that notch causes most "why is my signature invalid?" bugs:

Function / mode Escapes Leaves alone
encodeURIComponent (Component mode) everything except unreserved + ! ' ( ) * A-Z a-z 0-9 - _ . ~ ! ' ( ) *
Strict RFC 3986 (Strict mode) also ! ' ( ) * A-Z a-z 0-9 - _ . ~ — this is what AWS SigV4 and OAuth 1.0 expect
encodeURI (Whole URL mode) spaces, non-ASCII, control characters reserved: : / ? # [ ] @ ! $ & ' ( ) * + , ; =
x-www-form-urlencoded (Form mode) same as Component, then %20+ as Component, but spaces become +

If a signature check fails on exactly the characters ! ' ( ) *, you are comparing Component output with a Strict-mode signature — switch the mode and try again.

🎛️ Which mode should I use?

Decoding uses the same selector: in Form mode a + becomes a space, in the other modes it stays a plus sign (which is why a+b survives a round trip in Component mode but turns into a b in Form mode).

🚀 How to use this tool

  1. Paste a URL, a query string (?a=1&b=2) or a single value into the input box.
  2. Pick the mode that matches where the value is going.
  3. Press Encode or Decode. The output box holds the result, ready for its copy button.
  4. Read the panels underneath: the input is also parsed into scheme, host, port, path, query and fragment, the query string is expanded into a parameter table, every percent escape already present is decoded for you, and non-ASCII characters are shown with the exact UTF-8 bytes they will occupy.
  5. If the input looks double-encoded (%2520), Decode will tell you and decode it twice.

🐛 Common encoding mistakes

💼 Use cases

❓ Frequently asked questions

What is the difference between encodeURIComponent and encodeURI?

encodeURIComponent escapes everything except A-Z a-z 0-9 - _ . ! ~ * ' ( ) and is meant for a single value. encodeURI keeps the reserved characters so an entire URL stays a URL. Use Component mode for a value and Whole URL mode for an address.

Should a space be %20 or +?

In a path or a modern query string, %20. In application/x-www-form-urlencoded bodies and HTML form posts, +. The Form mode encodes to + and the Form decode mode turns + back into a space.

What about double encoding?

It shows up as %25 followed by two hex digits — %2520 where a space was expected. This tool detects the pattern and decodes twice, showing you the intermediate result.

Why does decoding sometimes fail?

decodeURIComponent throws on a truncated escape such as %E4%B8 or on bytes that are not valid UTF-8. This decoder is lenient by default: valid escapes are decoded, malformed ones are left untouched and listed in the status line, so you can still see the rest of the payload.

Is my URL sent to a server?

No. Encoding, decoding, URL parsing and the byte tables all run in your browser. Signed URLs with credentials in them are safe to paste here — nothing leaves the page.