URL decoder
Percent-encoding (also called URL encoding) is how URLs carry characters that are not safe to include literally — spaces, punctuation, and non-ASCII characters like accented letters or Chinese ideographs. Each unsafe character is replaced with a % sign followed by two hexadecimal digits representing its UTF-8 byte value. So a space becomes %20, a slash becomes %2F, and the letter ü becomes %C3%BC. This decoder reverses that — turning an encoded string or query parameter back into readable text.
How it works
The tool offers two decoding modes using the browser’s built-in JavaScript functions:
- Component mode —
decodeURIComponentdecodes every percent sequence, including reserved URL characters like:/?&#. Use this when decoding a single query value, a path segment, or any extracted piece — not the whole URL structure. - Full-URL mode —
decodeURIdecodes percent sequences but deliberately leaves the reserved URL separator characters (; , / ? : @ & = + $ # !) encoded, so a whole URL retains its structure and remains valid.
Each %XX sequence is interpreted as a UTF-8 byte. Multi-byte characters, like é (encoded as %C3%A9) or € (encoded as %E2%82%AC), are reassembled from their component bytes into the correct Unicode character. A % that is not immediately followed by two valid hexadecimal digits is malformed and causes a decode error rather than silently returning garbage.
Which mode to use
| Scenario | Mode |
|---|---|
Decoding a single query value (?q=hello%20world) | Component |
Decoding a path segment that might contain / | Component |
| Making a full URL human-readable while keeping its structure | Full-URL |
Decoding a form POST body (name=John%20Doe&age=42) | Component per field |
When in doubt, use component mode. It decodes everything, and if you feed it a complete URL it will still decode correctly — the only difference is that reserved characters like & will appear as themselves, which is usually what you want when you are reading the URL anyway.
Common encodings and their decoded values
| Encoded sequence | Decoded character | Notes |
|---|---|---|
%20 | (space) | Most common encoding |
+ | + (not a space) | + means space only in form encoding (application/x-www-form-urlencoded), not in percent-encoding |
%2F | / | Slash — reserved character |
%3D | = | Equals sign — reserved in query strings |
%26 | & | Ampersand — separates query parameters |
%3F | ? | Question mark — starts query string |
%23 | # | Hash — starts fragment; never sent to server |
%C3%A9 | é | Two-byte UTF-8 sequence |
%E2%82%AC | € | Three-byte UTF-8 sequence |
Worked example
Encoded query string: name%3DJohn%20Doe%26city%3DZ%C3%BCrich%26verified%3Dtrue
Decoding in component mode gives: name=John Doe&city=Zürich&verified=true
Step by step: %3D → =, %20 → space, %26 → &, %C3%BC → ü (two bytes of the ü character).
The result is the raw query string before any parameter parsing. You can now read the names and values directly, which is the typical use case when inspecting a copied URL from a browser’s address bar, a server log, or an API trace.
The plus sign — a common gotcha
In application/x-www-form-urlencoded encoding (HTML form POST bodies), a + represents a space. In standard percent-encoding, a + is just a literal plus sign. decodeURIComponent follows standard percent-encoding: it does not convert + to space. If you are decoding a form POST body where + means space, replace + with %20 before decoding, or use a form-body parser instead of a URL decoder.
All decoding runs in your browser using the built-in JavaScript functions — nothing is uploaded.