What is query string to JSON?
This tool parses a URL query string (the ?key=value&key2=value2 portion of a URL) into a clean JSON object. It's useful when debugging an API call, inspecting tracking parameters, or turning a GET request's parameters into a request body. It decodes percent-encoding, collapses repeated keys into arrays, and restores numbers and booleans to their real types. For the reverse direction, use JSON to Query String.
Parsing notes
- A leading
?or#is stripped, so you can paste a full URL's query or hash. +and%20both decode to a space.- Values are coerced with
JSON.parsewhen valid, otherwise kept as strings. - Duplicate keys become an array, preserving order.
How to use
- Paste a URL query string into the Input pane, with or without the leading
?. - The parsed JSON object appears instantly in the Output pane, pretty-printed.
- Percent-encoding is decoded; numbers and booleans are restored to their JSON types where possible.
- Repeated keys (
tags=a&tags=b) collapse into an array. - Runs 100% in your browser; nothing is uploaded.
Examples
Query string → JSON
page=2&limit=50&q=json+tools
{
"page": 2,
"limit": 50,
"q": "json tools"
}Repeated keys become an array
id=7&tags=a&tags=b
{
"id": 7,
"tags": [
"a",
"b"
]
}Percent-encoding decoded; a full URL's query works too
?redirect=https%3A%2F%2Fx.com&active=true
{
"redirect": "https://x.com",
"active": true
}FAQ
How do I convert a URL query string to JSON?
Paste the query string (the part after ?) into the input. Each key=value pair becomes a property; percent-encoding is decoded and the result is pretty-printed JSON. A leading ? or # is ignored, so you can paste it straight from the address bar.
Are values typed or left as strings?
The tool tries JSON.parse on each value, so page=2 becomes the number 2, active=true becomes the boolean true, and a JSON-encoded value becomes a nested object. Anything that isn't valid JSON stays a string.
What about repeated keys?
Query strings can repeat a key (tags=a&tags=b). Those collapse into an array: {"tags":["a","b"]}.
Numeric strings become numbers. Is that a problem?
Query strings are untyped, so a value like zip=90210 is ambiguous and is restored as a number. If you need it to stay a string, quote it in the source (zip=%2290210%22). This is an inherent limitation of query strings, not a bug.
Is my data uploaded?
No. Parsing uses the browser's built-in URL decoder. Zero network requests; verify in DevTools.