How to use the query string to JSON converter
- Paste a URL or a query string such as
a=1&b=2into the left pane. The JSON appears as you type. - Indent: 2 spaces, 4 spaces, tabs, or Minify.
- Brackets: a[b]=1 → object (nested JSON) or Keep keys as-is.
- Values: Keep as strings or Numbers & booleans.
- Copy or Download the result as
params.json.
Example
https://shop.example.com/search?q=mechanical+keyboard&tags[]=wireless&tags[]=rgb&price[min]=50&price[max]=200&page=2
becomes
{
"q": "mechanical keyboard",
"tags": ["wireless", "rgb"],
"price": { "min": "50", "max": "200" },
"page": "2"
}
How values are decoded
- Percent-escapes are decoded, so
%20becomes a space and%C3%A9becomesé. +means a space, as in HTML form submissions.- A key without
=(for example?debug) gets an empty string value. - A broken escape, such as
%ZZor a lone%, is reported instead of being decoded incorrectly.
Bracket rules
a[b]=1anda[b][c]=1build nested objects.a[]=1&a[]=2appends to a list.a[0]=x&a[1]=ysets list positions. Indexes must be in order without gaps, so a hostile URL like?a[999999]=xcan’t create a huge array.- A key can’t be both a value and a group:
a=1&a[b]=2is reported as an error.
When to use it
- Debugging tracking links and redirects with long lists of UTM or OAuth parameters.
- Reading API calls copied from the browser’s network panel.
- Building test fixtures from real URLs.
Why not just split on &?
A quick split misses the details that break real URLs: + versus %20 for spaces, encoded & and = inside values, repeated keys, bracket syntax for nested data and broken escapes. This tool decodes values the way form submissions are encoded, with + as a space and UTF-8 percent-escapes, so the JSON matches what a typical server receiving the request sees. When an escape is malformed it tells you which parameter is broken instead of quietly producing the wrong text. Parameter order is kept, so the JSON lists keys in the order they appear in the URL, which makes it easy to compare with the original link.
To see every part of a URL, not only its query, use the URL Parser. To decode a single value, use URL Encode / Decode. Need the reverse? Click Reverse or open JSON to Query String.
Frequently asked questions
Can I paste a whole URL?
Yes. With a full URL (https://… or a path starting with /) the tool reads only the part after ?, and the #fragment is ignored. You can also paste just the query, with or without the leading ?.
How are repeated keys handled?
A key that appears more than once, like tag=a&tag=b, becomes an array: "tag": ["a", "b"]. A key that appears once stays a single string.
What do brackets like a[b]=1 do?
By default they build nested JSON, the convention of PHP, Ruby on Rails and the qs library: price[min]=50 becomes {"price": {"min": "50"}}, tags[]=x appends to a list, and items[0]=x sets a list position. Choose "Keep keys as-is" to keep the bracket keys literally instead.
Why are numbers strings?
Everything in a query string is text, so that is the default. Set Values to "Numbers & booleans" to turn values like 2 and true into JSON numbers and booleans.
Is the URL sent anywhere?
No. Parsing runs in your browser, so URLs containing tokens or personal data never leave your device.
Last updated