How to use
Pick Encode or Decode at the top right, paste your text, and the converted result appears live in the right pane. Encode runs the standard encodeURIComponent — every byte outside the unreserved set (A–Z, a–z, 0–9, and `-_.~`) is replaced with its `%XX` UTF-8 hex form. Decode does the reverse, throwing a clear error if the input contains a malformed `%` escape.
Reach for this when a value needs to ride through a URL: a query string parameter, a path segment, a redirect target. Forms and modern HTTP libraries usually handle encoding automatically, but you'll need a manual pass when assembling URLs by hand, debugging webhook callbacks, or pasting a tracking link a colleague sent. Everything runs in the browser, so URLs holding tokens or PII stay on your machine.
FAQ
Is URL encoding the same as encryption?
No. Percent-encoding is a reversible transformation that anyone can undo without a key. It exists to fit arbitrary text into URL syntax (where `?`, `&`, `=`, space, and `#` already carry structural meaning), not to hide content. Never use it as a security layer.
encodeURI vs encodeURIComponent — which does this tool use?
encodeURIComponent. The difference matters: encodeURI preserves URL structural characters like `:` `/` `?` `&` `#` (suitable for a *whole URL*), while encodeURIComponent escapes them too (suitable for a *single value* embedded in a URL). If you paste an entire URL and only want the query value transformed, split it manually first.
Why does `+` not become a space when I decode?
encodeURIComponent uses `%20` for spaces and never produces `+`. The `+` = space convention belongs to the older `application/x-www-form-urlencoded` format used by HTML form submissions. If your input uses `+` for spaces, replace `+` with `%20` before decoding here, or use a form-urlencoded decoder.
Why does my browser show `한국` in the URL bar but copy `%ED%95%9C%EA%B5%AD` when I paste?
Modern browsers render percent-encoded UTF-8 as the original characters for readability, but they store and copy the raw encoded form for accurate transmission. The two are equivalent representations of the same URL — both decode to the same text here.
Does it support internationalized domain names (IDN)?
No — this tool handles only the value side (path, query, fragment). Hostnames with non-ASCII characters use Punycode (`xn--…`) instead of percent-encoding and need a different conversion. Modern browsers display the Unicode form but transmit Punycode under the hood.
Why does the encoder leave `-`, `_`, `.`, `~` alone?
These four characters form the *unreserved* set in RFC 3986. They never need escaping because they cannot be confused with URL structural characters. encodeURIComponent intentionally passes them through.
Related concepts
Percent-encoding (also called URL encoding) is defined by RFC 3986. Each byte outside the *unreserved* set (A–Z, a–z, 0–9, `-` `_` `.` `~`) becomes a `%` followed by two uppercase hex digits. Because URLs are byte-oriented, non-ASCII text is first converted to UTF-8, then each byte is percent-escaped — that's why a 3-byte Korean syllable expands to nine characters (`%XX%XX%XX`).
JavaScript exposes four related functions and they behave differently. `encodeURI` and `decodeURI` preserve URL structural characters (`: / ? & = # @`), suitable for whole URLs. `encodeURIComponent` and `decodeURIComponent` escape those too, suitable for individual values embedded in a URL — this tool uses the latter pair. A separate scheme, `application/x-www-form-urlencoded`, encodes spaces as `+` instead of `%20` and is what HTML forms produce; many backend frameworks accept both.
Three adjacent concepts often get confused with percent-encoding. **Base64** packs binary into ASCII text but uses `+` and `/` that themselves need URL-escaping (base64url solves this). **HTML entities** (`&`, `😀`) escape characters for HTML, not URLs. **Punycode** (`xn--…`) handles internationalized domain names because hostnames cannot use percent-encoding.