Skip to content
AgileLogics

URL Decoder

Decodes a percent-encoded string (via decodeURIComponent) back into readable text.

How it works

Paste a percent-encoded string into the input panel and click Decode. Malformed sequences are flagged with an error.

What is a URL decoder?

A URL decoder converts percent-encoded text back into readable characters. Each % followed by two hex digits stands for one byte, so %20 becomes a space and %C3%A9 becomes é. You need it when reading query strings in server logs, redirect parameters, tracking links, or any URL that's hard to read because of escapes.

Percent-encoding is defined in RFC 3986. This tool decodes it with JavaScript's decodeURIComponent(), treating the bytes as UTF-8.

How to decode a URL

  1. Paste the encoded URL or query value into the input box.
  2. Click Decode.
  3. Read or copy the decoded text from the output panel.

If any escape in the input is broken, you'll get the error "Malformed percent-encoded sequence." and no output, rather than a partly decoded result.

Worked example

A marketing link often carries the destination URL as an encoded parameter. Decoding the parameter value:

https%3A%2F%2Fexample.com%2F%3Fq%3D1

gives:

https://example.com/?q=1

Non-ASCII characters are made of several bytes, which the decoder joins back together:

Encoded Decoded
hello%20world hello world
caf%C3%A9 café
%E2%82%AC €
%F0%9F%91%8D 👍
%25 %
%2541 %41
a+b a+b

The %2541 row shows double encoding. One pass turns %25 into % and leaves 41 alone, giving %41. Decode again and you get A.

Errors and how to fix them

Input Problem Fix
100% % not followed by two hex digits Write a literal percent sign as %25
%zz z isn't a hex digit Check for a typo or a truncated copy
%C3 Incomplete UTF-8 sequence The second byte (%A9 for é) is missing, often because the URL was cut off
%FF Not valid UTF-8 The text was probably encoded in Latin-1 or another legacy charset

The last case comes up with old systems that encoded é as %E9 (one Latin-1 byte) instead of %C3%A9. That's valid percent-encoding, but it isn't UTF-8, so this decoder rejects it.

Plus signs and form data

When an HTML form is submitted with GET, browsers encode the fields as application/x-www-form-urlencoded, where a space becomes +. The WHATWG URL standard describes this format. This decoder doesn't treat + as a space, so fish+chips stays fish+chips. Replace the plus signs with spaces first if your input came from a form. A real plus sign in form data is sent as %2B, so it survives either way.

Things to check after decoding

  • Look before you click. Decoding a suspicious link shows you where it really goes, for example a redirect= parameter pointing to an unfamiliar domain.
  • Decoded text isn't sanitized. If you put decoded values into HTML or SQL in your own code, escape them for that context.
  • Some parts may still be encoded another way. Parameters that look like long runs of letters and digits ending in = are often Base64. Paste them into the Base64 decoder.

Related tools

Last updated

Frequently asked questions

Why aren't plus signs turned into spaces?
The decoder follows percent-encoding rules, where + is a literal plus sign. Only HTML form encoding uses + for a space. If you're decoding a form-submitted query string such as q=fish+chips, replace each + with a space (or %20) before decoding.
What does "Malformed percent-encoded sequence" mean?
Somewhere in the input there's a % that isn't followed by two hex digits, such as "100%" or "%zz", or the %XX bytes don't form valid UTF-8, such as a lone %C3 or %FF. Nothing is decoded until you fix it. A literal percent sign must be written as %25.
My URL was encoded twice. How do I fully decode it?
Run it through the decoder twice. Double-encoded text contains %25 where the original % was, so %2520 decodes to %20 on the first pass and to a space on the second.
Does it decode a whole URL or just part of it?
Either. Every %XX escape in the input is decoded, including %2F, %3F and %26, so a full encoded URL like https%3A%2F%2Fexample.com%2F%3Fq%3D1 becomes https://example.com/?q=1.
Is the URL sent to a server?
No. Decoding uses JavaScript's built-in decodeURIComponent in your browser. The page doesn't visit or check the URL.