What does this tool do exactly?
It decodes a percent-encoded string with decodeURIComponent, runs the result through JSON.parse to confirm it is real JSON, then pretty-prints it with 2-space indentation. Two failure modes are reported separately: a URIError means the percent-encoding is malformed, and a SyntaxError means the decoded text is not valid JSON.
I only have a query string — what should I paste?
Paste the value of one parameter, not the whole URL. If your URL is /api?state=%7B%22id%22%3A42%7D, copy %7B%22id%22%3A42%7D — the part after state=. Pasting the full URL leaves & and = untouched, which then breaks JSON parsing.
Why does the decoder say invalid JSON when I pasted a URL?
Because the percent-decoded URL still contains URL syntax — slashes, equals signs, and ampersands — that JSON.parse rejects. The tool decodes percent-encoding correctly, but the underlying value is not JSON. Extract just the JSON parameter value and try again.
Does this handle double-encoded values?
Run it twice. The first decode produces a string that still contains %XX sequences (because %25 became %, restoring the inner encoding). Paste that result back and decode again. If you only see %XX in the first output, that is the signal a second pass is needed.
How are Unicode characters reconstructed?
Multi-byte percent sequences (like %E4%BD%A0 for 你 or %F0%9F%9A%80 for the rocket emoji) are interpreted as UTF-8. The decoded string contains the original Unicode characters, then JSON.parse handles any \uXXXX escapes that were inside the JSON itself.
Does + decode as a space here?
No. decodeURIComponent treats + as a literal plus sign. If your value came from a form-encoded body (application/x-www-form-urlencoded), replace + with space first, then paste it here. URLs built with encodeURIComponent never produce + so this only matters for form bodies.
Why pretty-print after decoding?
Encoded JSON is always compact (single line, no whitespace) because JSON.stringify produces a canonical form before encoding. Pretty-printing makes the decoded value readable so you can see structure at a glance — useful for debugging analytics events, OAuth state, or webhook payloads.
Is the decoded JSON sent to a server?
No. Decoding and parsing run entirely in your browser. Open DevTools → Network and click Decode — no requests leave the page. Safe for OAuth states, signed parameters, or any sensitive structured data captured in URLs.