URL-Encoded Input

Decoded JSON

What Is JSON URL Decoding?

When a JSON string is embedded in a URL, special characters like {, ", spaces, and brackets are replaced with %XX percent-encoded sequences so the URL remains valid. This tool reverses that process using JavaScript's decodeURIComponent() function, then pretty-prints the result as formatted JSON.

URL decoding is the inverse of URL encoding (see our JSON URL Encoder). According to RFC 3986, percent-encoded octets are decoded to their original byte values. If the decoded string is valid JSON, this tool formats it for readability.

How to Decode URL-Encoded JSON

Follow these steps to decode your URL-encoded JSON string.

1

Paste the URL-encoded string

Paste your URL-encoded JSON (e.g., %7B%22name%22%3A%22Alice%22%7D) into the input panel. You can also click Sample to load a demo.

2

Instant decoding and formatting

The tool decodes the string with decodeURIComponent() and, if the result is valid JSON, pretty-prints it with 2-space indentation. Malformed percent sequences are flagged with an error message.

3

Copy the formatted JSON

Click Copy to copy the decoded JSON to your clipboard. You can then use it in your code, a JSON validator, or any other tool.

Common Use Cases

Inspecting API Query Parameters

When debugging API calls, the query string often contains URL-encoded JSON parameters that are hard to read. Paste them here to see the raw JSON structure instantly.

Recovering Shared State Links

Single-page apps often store state as URL-encoded JSON. Decoding these lets you inspect, modify, or reproduce the application state without running the app.

Log File Analysis

Server and CDN access logs frequently contain URL-encoded JSON in request paths or query strings. Decode them here to read the original payloads.

Testing and QA

QA engineers can decode the JSON parameters sent in automated test requests to verify the payloads match the expected schema, without needing to intercept raw network traffic.

Frequently Asked Questions

What if the decoded string is not valid JSON?

The tool will still show the decoded string in the output panel — it will not be pretty-printed, but you can still copy it. An informational note will indicate the result is not valid JSON.

What is the difference between decodeURIComponent and decodeURI?

decodeURIComponent decodes all percent-encoded sequences including %2F (/), %3F (?), etc. decodeURI leaves URL structural characters encoded. For decoding JSON values from a query string, decodeURIComponent is correct.

What happens if the input contains invalid percent sequences?

If the input contains a malformed sequence (e.g., %ZZ or a lone %), decodeURIComponent throws a URIError. This tool catches that error and shows a descriptive message.

Does my data leave my browser?

No. All decoding and formatting happens entirely in your browser. Your data is never transmitted to any server.

How do I encode JSON for a URL?

Use our companion JSON URL Encoder tool, which applies encodeURIComponent() to your JSON string.

Related Tools

Explore more JSON and URL utilities on jsonparser.ai.