The JS URL Decoder on FreeToolZones turns percent-encoded text back into the readable characters it represents. Percent-encoded text is the form URLs take when they carry spaces, symbols, or non-ASCII characters: each special byte becomes a percent sign followed by two hexadecimal digits, and the result is correct for machines but miserable for people. A link copied from a browser address bar, a query string copied from a log, or a value copied from a redirect chain can be a long run of percent sequences that hides the real address or message. This tool decodes it in your browser, with one option for form-encoded data, and shows you the original text.
Decoding is the inspection step for anything that traveled through a URL. Before you trust a link, reuse a query value, or debug why a request carried the wrong data, decoding the encoded form shows you what was actually sent. The tool is strict about malformed input: a percent sign that is not followed by two hexadecimal digits produces an error instead of a guess, which protects you from silently misreading damaged data. That strictness is a feature, and understanding it will save you from chasing phantom bugs.
What Is the JS URL Decoder?
The JS URL Decoder is a free online tool that applies the JavaScript decodeURIComponent function to text you enter. That function reverses percent-encoding: each valid percent sequence becomes the byte it represents, and the resulting UTF-8 bytes become characters. A space written as percent-twenty becomes a space again, an encoded slash becomes a slash, and a sequence of encoded bytes representing a non-ASCII character becomes that character. The whole input is decoded as one value, which matches how query values and encoded fragments are normally handled.
The single option is a checkbox labeled Treat + as a space (form-encoded data), off by default. When it is ticked, every plus sign in the input is replaced with a space before decoding, which matches the form submission convention where spaces are written as plus signs. When it is unticked, plus signs are left alone and survive decoding as plus signs, which is the correct behavior for ordinary percent-encoded text, where a literal plus sign is written as its own percent sequence and a bare plus means a plus. The choice matters: ticking the box for data that is not form-encoded will corrupt genuine plus signs, and leaving it unticked for form data will leave plus signs where spaces belong.
Error handling is deliberately strict. The decode function throws an error when it meets a malformed percent sequence, such as a percent sign at the end of the input, a percent sign followed by characters that are not hexadecimal digits, or an incomplete UTF-8 byte sequence. The tool catches that error and shows a message explaining that the input contains a malformed percent-encoded sequence, giving the example of a percent sign not followed by two hexadecimal digits. It does not guess, skip, or partially decode. A lone percent sign in otherwise plain text is enough to trigger the error, which is correct behavior for a decoder, even if it surprises people pasting text that was never encoded.
The output is the decoded text, shown with a Copy button and no statistics, because the decoded text is the whole result. The Load sample button fills the input with a fully encoded example address, whose decoded form is a readable URL with a search query. Decoding that sample is the fastest demonstration of the tool, and it also shows an important subtlety: decoding the whole encoded address restores the complete address, including its structural characters, because they were all encoded in the sample.
How to Use the JS URL Decoder
Decoding takes three steps.
- Paste the percent-encoded text. Click in the box labeled Encoded text and paste the value you want to decode. The hint below the box explains that percent sequences are decoded back to the original characters, and that a lone percent sign or an incomplete sequence is reported as an error instead of guessed.
- Decide about plus signs. Leave Treat + as a space unticked for ordinary percent-encoded text. Tick it only when the data came from a form submission or another form-encoded source, where plus signs represent spaces. If you are unsure, decode once with the box unticked and read the result: plus signs where you expected spaces mean the data was form-encoded.
- Press Decode and copy the result. Click the Decode button. If the box is empty or contains only whitespace, the tool asks you to enter percent-encoded text first. If the input is malformed, an error explains the problem. Otherwise the decoded text appears below, with a Copy button. Press Copy to take it to your clipboard.
When an error appears, inspect the input for the malformed sequence. Look for a percent sign near the end of the text, a percent sign followed by a space or a letter outside the hexadecimal range, or a value that was only partially encoded. Text that was never encoded, such as a sentence containing a percent sign followed by a number, will also fail, because the decoder cannot know the percent sign was literal. In that case, the text needs no decoding, or the percent sign needs to be encoded itself before the rest is decoded. Fixing the input and decoding again is usually quick.
Key Features of the JS URL Decoder
The feature set is small: one decoding function, one option, and strict errors.
Full percent-decoding with decodeURIComponent
The tool uses the browser built-in decoding function, so its behavior matches what JavaScript code using the same function produces. Every valid percent sequence is decoded, including multi-byte UTF-8 sequences for non-ASCII characters, and the result is the exact original text when the input was correctly encoded.
Optional plus-as-space handling for form data
The checkbox implements the form-encoded convention by converting plus signs to spaces before decoding. It is off by default, which is correct for ordinary percent-encoded text, and it pairs with the form mode of the JS URL Encoder, which produces plus signs for spaces. The two options together form a complete round trip for form data.
Strict error reporting without guessing
Malformed sequences produce a clear error message with an example of the problem, instead of a partial or guessed decode. That strictness prevents silent corruption, where damaged input would otherwise decode to plausible-looking but wrong text. An error is an invitation to inspect the input, not a failure of the tool.
Copy-ready output
The decoded text appears with a Copy button, so the result can be pasted into a browser, a document, or code without manual selection. The sample button demonstrates a full decode in one click.
Practical Use Cases
Decoding is useful wherever encoded text needs to be read, checked, or reused. The examples below cover the common cases.
Reading a copied link
Links copied from browsers, emails, and documents often arrive percent-encoded, especially when they contain search terms, non-ASCII path segments, or redirect parameters. Decoding the link shows the real address and the real query values, so you can confirm where it leads before opening it or sharing it with someone else.
Inspecting query values from logs
Server logs, analytics exports, and debugging output record query strings in encoded form. Decoding a value from a log shows what the user actually searched for, entered, or selected, which is essential for understanding behavior and for reproducing a reported problem. The plus-as-space option matters here when the log records form submissions.
Debugging double encoding
When a value has been encoded twice, decoding it once produces text that still contains percent sequences, such as percent-two-five where a percent sign was encoded. Recognizing that pattern is the key to diagnosing double encoding: decode again, and the original text appears. The decoder makes this diagnosis visible in seconds, where reading the raw value would hide it.
Recovering text from redirect chains
Redirect and tracking links often nest one encoded address inside another. Decoding the outer value reveals the inner address, which may itself need decoding. Repeating the process peels back the layers until the final destination is readable, which is useful for checking where a link really goes.
Verifying encoder output
After encoding text with the JS URL Encoder, decoding the result here and comparing it with the original confirms the round trip. That check catches mode mistakes, such as encoding a value with the full-URL mode and leaving structural characters unescaped, because the decoded result will differ from the input in revealing ways.
Tips and Best Practices
- Decode only text that was encoded. Plain text containing a percent sign will fail, because the decoder treats every percent sign as the start of a sequence. If the text was never encoded, it needs no decoding.
- Choose the plus option based on the source. Form submissions and form-encoded bodies use plus for space. Ordinary links and query values do not. Matching the option to the source is the difference between correct spaces and corrupted plus signs.
- Read errors as data. A malformed sequence error tells you the input is damaged or was never encoded. Inspect the percent signs in the input before assuming the decoder is at fault.
- Watch for double encoding. If decoded output still contains percent sequences, the input was probably encoded twice. Decode the output again to reach the original text.
- Decode nested values layer by layer. An address nested inside another address needs one decode per layer. Decode, inspect, and decode again, rather than expecting one pass to resolve everything.
- Do not trust a decoded link blindly. Decoding shows where a link leads, but it does not make the destination safe. Check the decoded address before opening it, especially for links from untrusted sources.
Limitations
The decoder applies one decoding function to the whole input. It does not parse an address into parts, so decoding a whole address that contains a mix of encoded and unencoded sections can produce a result where structural characters and value characters are indistinguishable. It does not handle other encodings: Base64, HTML entities, and Unicode escapes are different schemes with their own tools on this site. It does not repair malformed input, and it cannot recover the original text when percent sequences are missing or corrupted, because the missing bytes are simply gone.
The plus-as-space option applies to the whole input when ticked, so mixed data, where some plus signs are literal and others represent spaces, cannot be decoded correctly in one pass. The tool decodes one input at a time in the browser, and it does not save or export results beyond the Copy button. Finally, decoding is a text operation: it does not fetch the decoded address, check that it exists, or verify that it is safe.
Frequently Asked Questions
Why does my input fail with a malformed sequence error?
The input contains a percent sign that is not followed by two hexadecimal digits, or an incomplete UTF-8 byte sequence. Common causes are a trailing percent sign, a literal percent sign in plain text, or a value that was truncated. Inspect the percent signs in the input and fix the malformed one.
When should I tick the plus-as-space box?
Tick it when the data came from a form submission or another form-encoded source, where spaces are written as plus signs. Leave it unticked for ordinary percent-encoded text, where a plus sign is a literal plus.
Why does decoded output still contain percent sequences?
The input was probably encoded twice. Each decode removes one layer of encoding. Decode the output again to remove the next layer, and repeat until the text is fully readable.
Can the decoder handle non-English text?
Yes. Multi-byte UTF-8 sequences decode back to the original characters, including text in any language and emoji, provided the encoding was complete and correct.
Does decoding make a link safe to open?
No. Decoding only reveals where a link leads. Check the decoded address carefully before opening it, especially if the link came from an untrusted source.
Is my input uploaded anywhere?
No. Decoding runs entirely in your browser, and nothing is sent to a server.
Related Tools
These tools encode URLs, handle the neighboring encodings, and inspect the content decoding reveals.
- JS URL Encoder – percent-encode a query value, a full URL, or form data with the matching modes.
- URL Decoder – the general URL decoding tool in the Developer category.
- JS Base64 Decoder – decode Base64 values when a URL carries encoded data in that form.
- JS HTML Entity Tool – decode HTML entities when text arrives encoded for a web page.
- Phishing URL Checker – check a decoded address when you need to assess whether it is safe.