"category": "dev-utility",

URL Decoder

"tldr": Paste a percent-encoded URL or parameter and read it as plain text - %20, +, and UTF-8 sequences decoded correctly.

Decode percent-encoded text back to readable form: %20 to space, %26 to &, multi-byte UTF-8 sequences like %C3%A9 back to é, and + treated as a space (the form-encoding convention). Malformed sequences are reported instead of silently mangled.

{"url-encoded": "text"}

The daily use case is reading URLs out of logs, analytics exports, and referrer headers - where a search query or redirect target is buried in three layers of %25-encoding and unreadable to humans.

How to URL-decode text

  1. 1Paste the encoded text - a full URL, a query string, or a single value.
  2. 2%XX sequences are decoded, with multi-byte runs interpreted as UTF-8.
  3. 3+ is treated as a space, matching how form data and most query strings encode.
  4. 4Decode twice if the result still contains %25 sequences - that is double encoding.

Convert URL-encoded to Text in code

JavaScript
decodeURIComponent("coffee%20%26%20cream"); // 'coffee & cream'
// query strings with +:
new URLSearchParams("q=coffee+%26+cream").get("q");
Python
from urllib.parse import unquote, unquote_plus

unquote("coffee%20%26%20cream")   # 'coffee & cream'
unquote_plus("coffee+%26+cream")  # 'coffee & cream'

Frequently asked questions

The output still has % sequences in it - why?

The input was encoded more than once: %2520 decodes to %20, which decodes to a space. Run it through again. Log pipelines and redirect chains commonly stack two or three layers.

Why did decoding fail with a malformed-encoding error?

A % not followed by two hex digits is invalid - usually a truncated value (log line cut mid-sequence) or a literal % that was never encoded. Find the offending %, and either repair the truncation or encode the literal as %25.

Should + always decode to a space?

In query strings and form bodies, yes. In path segments, a + is officially a literal plus - so if you are decoding a path and plusses matter (e.g. phone numbers), decode with a strict decoder like JavaScript decodeURIComponent, which leaves + alone.

Last updated:

You might also need

Free and in-browser, like everything on JSON Console. Browse all tools →