Query String to JSON Converter

Turn a query string or full URL into a JSON object with values decoded and nested keys expanded.

Query string or URL
JSON
Runs locally in your browser

About the Query String to JSON Converter

Query strings encode structured data in a flat, escaped form. This converter parses one, or pulls it from a full URL, and produces JSON: each parameter becomes a key, values are percent-decoded, repeated keys become arrays, and with expansion on, bracket notation such as filters[color] and dotted keys become nested objects, the way PHP, Rails and Express parse them.

Decoding follows the URLSearchParams rules built into every browser, which come from HTML form encoding: %20 and a bare + both become a space, and the remaining percent escapes are decoded byte by byte as UTF-8. That plus sign is the classic trap. A value that genuinely contains one, a phone number written as +441632960961 or a base64 string ending in +, has to be sent as %2B or it arrives as a space, and afterwards no parser can tell which it was.

Values stay strings, since a query string carries no type information, and a duplicated key keeps every value rather than only the last. Reading the parameters of a long campaign link, or reconstructing what an HTML form actually submitted when a bug report contains nothing but the URL, is what it gets used for. The reverse converter builds a query string from JSON, and the URL Parser shows the other parts of the URL.

How to use

  1. Paste a query string or a whole URL.
  2. Leave expansion on for bracket and dotted keys.
  3. Copy the JSON.

Common questions

How are repeated keys handled?
They become an array of values.
What does expansion do?
It turns filters[color]=grey into { "filters": { "color": "grey" } }, matching how most web frameworks parse it.
Are values typed?
No, they stay strings, since a query string carries no type information.