Skip to content
{ }JSON Formatter

Query String to JSON

Parse a URL query string into JSON — bracket notation rebuilds nested objects and arrays, percent-encoding is decoded, a leading ? is fine.

Input
Output
Paste input and press To JSON.

Query string in, JSON out

Paste the part of a URL after the ? (the ? itself is optional) and get structured JSON. Each key=value pair is percent-decoded, and bracket notation is expanded back into nesting: filter[type]=free becomes {"filter":{"type":"free"}}, and numeric brackets like tags[0] rebuild arrays.

What you get back

Values are returned as strings — deliberately. A query string has no type information, so page=2 parses to "2", not 2. That is the honest reading; coerce types in your own code where you know the schema. Reconstruction handles repeated keys, deep nesting and mixed object/array paths.

Reading a real URL

Grabbing params off a live URL, a redirect, or an OAuth callback? Paste the whole query part — the decoder tolerates a leading ? and +-as-space encoding. Then pretty-print or explore the result in the tree viewer. The reverse direction is JSON to Query String.

Frequently asked questions

Does it handle nested bracket notation?

Yes — filter[type]=free rebuilds a nested object, and tags[0]=a, tags[1]=b rebuild an array (numeric brackets become indices). Deep paths like a[b][c]=1 work too.

Why are all values strings?

Because a query string carries no types — everything on the wire is text. page=2 becomes "2". Converting "2" to a number is a schema decision only your code can make correctly, so the tool does not guess.

Can I paste a full URL?

Paste the query part (after the ?). A leading ? is tolerated, but the scheme/host/path are not parsed — copy from the ? onward. Both %20 and + are decoded as spaces.

What about duplicate keys?

Plain duplicate keys (a=1&a=2) resolve to the last value. To collect them as an array, use explicit indices (a[0]=1&a[1]=2), which is unambiguous.