JSON URL Decoder

Decodes a percent-encoded (URL-encoded) value back to text with decodeURIComponent(), then validates and pretty-prints it as JSON, the reverse of URL-encode JSON. A free online tool from Staaarter, right in your browser.

Runs locallyUpdated 2026-07-22

Overview

Introduction

A JSON value pulled from a URL's query string arrives percent-encoded, its braces, quotes, and colons replaced with %XX sequences, and needs decoding before it's readable. This tool decodes it and validates the result in one step.

That combination matters because a successful percent-decode doesn't guarantee the decoded text is actually valid JSON; this tool checks both.

What Is JSON URL Decoder?

A URL decoder scoped to JSON: it reverses percent-encoding with decodeURIComponent(), then parses and pretty-prints the resulting text as JSON.

It's the exact mirror of URL-encode JSON, restoring a percent-encoded query parameter back to a readable document.

How JSON URL Decoder Works

The tool passes your input to decodeURIComponent(), which converts every %XX sequence back to its original character, then attempts to parse the decoded text as JSON.

If either step fails, decoding malformed percent-encoding or parsing invalid JSON, a specific error is shown so you know which stage the problem is in.

When To Use JSON URL Decoder

Use it when debugging a URL parameter that carries JSON-shaped application state and you need to see the actual data.

It's also useful when verifying that a URL-encode JSON encoding round-trips correctly before shipping a shareable link.

Features

Advantages

  • Decodes and validates as JSON in one step, catching problems at either stage.
  • Matches the browser's own decodeURIComponent() behavior exactly.
  • Pretty-prints the result automatically for readability.

Limitations

  • Expects just the encoded value, not a full query string with parameter names and ampersands.
  • Doesn't recover data if the original percent-encoding was already corrupted before you copied it.

Examples

Decoding a query parameter value

Input

%7B%22status%22%3A%22active%22%2C%22limit%22%3A10%7D

Output

{
  "status": "active",
  "limit": 10
}

Percent-encoded braces, quotes, colons, and commas decode back to their literal characters, then the result is pretty-printed.

Best Practices & Notes

Best Practices

  • Copy only the value portion of a query parameter, not the leading '?' or 'key=' prefix.
  • If decoding fails, check for a stray literal % character not followed by two hex digits.
  • Re-validate decoded data on the server too; never trust client-supplied query parameters blindly.

Developer Notes

Decoding is a direct decodeURIComponent(input) call wrapped in a try/catch, since malformed percent sequences (like a trailing lone %) throw a URIError; the result is then run through JSON.parse() with the standard error-location logic shared across this category's tools.

JSON URL Decoder Use Cases

  • Inspecting JSON-shaped state carried in a shared link's query string
  • Debugging an API request built with a URL-encoded JSON parameter
  • Verifying a URL-encode/decode round trip during development

Common Mistakes

  • Pasting the whole query string including '?' and other parameters instead of just the target value.
  • Assuming a successful decode means valid JSON; the two are checked separately.
  • Double-decoding a value that was already decoded by the browser or framework.

Tips

  • If you're not sure whether a value is already decoded, try validating it as JSON directly first.
  • Pair with URL-encode JSON to confirm symmetric encode/decode behavior.

References

Frequently Asked Questions