Overview
Introduction
Copy a link out of a browser's address bar or an API log and you'll often see %20, %2F, and similar sequences standing in for spaces and punctuation. This tool reverses that encoding so you can read or reuse the original text.
It's most useful when you're staring at a raw access log, a webhook payload, or a redirect URL and just need to know what value is actually being carried, rather than mentally decoding %XX sequences one at a time.
What Is URL Decoder?
URL decoding reverses percent-encoding: each %XX sequence gets interpreted as a hexadecimal byte, and the resulting bytes are decoded back into text.
It's the mirror image of URL encoding. Anywhere text was escaped to survive being embedded in a URL, this recovers the original characters, including reserved ones like & and + that only look structural until they're decoded.
How URL Decoder Works
The tool passes your input through the browser's native decodeURIComponent function, which interprets each percent-encoded byte sequence as UTF-8 and reconstructs the original characters, throwing an error if a sequence is malformed.
Because decoding is byte-oriented, multi-byte UTF-8 sequences (used for non-ASCII characters like emoji or accented letters) get reassembled correctly as long as every constituent %XX byte is present. A truncated or corrupted sequence is exactly what triggers the malformed-input error instead of returning garbled text.
When To Use URL Decoder
Use it to read a percent-encoded query string from server logs, inspect a copied redirect URL, or verify that a value you encoded elsewhere decodes back to what you expect.
It also helps when debugging integrations: if an API returns a percent-encoded value where you expected plain text, decoding it here quickly tells you whether the encoding itself is the bug or just an intermediate representation.
Often used alongside URL Encoder.
Features
Advantages
- Runs entirely client-side, so pasted URLs or tokens never leave your browser.
- Surfaces malformed encoding as a clear error instead of silently producing garbled text.
- Matches native browser decoding behavior exactly.
Limitations
- Doesn't convert + to a space - that's a separate, form-encoding-specific convention.
- Decoding an already-decoded string does nothing useful, since there's no percent-encoding left to interpret.
Percent-Decoding vs. Form Decoding
| Percent-decode (this tool) | Form decode (application/x-www-form-urlencoded) | |
|---|---|---|
| Converts %20 to a space | Yes | Yes |
| Converts + to a space | No | Yes |
| Used for | Query string and path values | HTML form submissions |
Examples
Best Practices & Notes
Best Practices
- Decode individual query parameter values rather than an entire URL to avoid corrupting the URL's structural characters.
- If you're processing form submissions, convert + to a space before decoding, since that's a separate convention this tool doesn't apply.
- Pair with the URL encode tool to sanity-check round-trips while debugging.
- When a decode fails, check the exact position of the reported % first; a truncated copy-paste or a log line cut off mid-sequence is the most common cause.
- Treat a decoding error as a signal to inspect the source of the value, not something to work around by stripping the stray % and re-decoding. That usually just hides a real upstream bug.
Developer Notes
This wraps the native decodeURIComponent function with no additional leniency layered on top, so a malformed sequence throws exactly as it would in your own code. decodeURIComponent processes the input as a sequence of UTF-8 bytes: each %XX is decoded to a raw byte, consecutive bytes belonging to the same multi-byte UTF-8 character are combined, and the result is reassembled into a JavaScript string. Any byte sequence that isn't valid UTF-8, whether from a truncated multi-byte character or a random invalid hex pair, causes the function to throw a URIError rather than substitute a replacement character, which is why this tool reports a clear error instead of ever returning mangled or partially decoded text.
URL Decoder Use Cases
- Reading a percent-encoded query string copied from a server access log
- Inspecting a redirect URL to see what value it actually carries
- Verifying that an encoded value round-trips correctly during debugging
- Diagnosing whether an unexpected %XX sequence in application data is the bug, or just an intermediate encoded representation
Common Mistakes
- Assuming + will decode to a space. It won't, since that's a form-encoding rule, not part of percent-decoding.
- Decoding a string that was never encoded, which just returns the same text unchanged and can mask a different bug.
- Decoding a full URL instead of a single value, which also unescapes characters that were deliberately encoded to preserve the URL's structure.
- Treating a decoding error as random noise instead of a sign of truncated or corrupted input worth tracing back to its source.
Tips
- If decoding throws an 'invalid' error, check for a stray % that isn't followed by two hex digits.
- Use the encode tool on the output afterward to confirm you get back exactly the string you started with.
- If a value contains %XX sequences that don't decode to anything readable, confirm it wasn't encoded twice before assuming it's genuinely malformed.