JSON to GET params — Guide

Flatten JSON into a URL query string (a[b][0]=1 style) and rebuild JSON from a query string or a full URL.

What it is and when to use it

HTML forms and many server frameworks encode structured data in the query string using bracket notation: a nested object { "b": { "c": 2 } } becomes b[c]=2, and an array { "list": [1, 2] } becomes list[0]=1&list[1]=2. This tool flattens JSON into that exact notation so you can drop a JSON payload straight into a URL, and parses a query string back into nested JSON when you receive one. It is the bridge between a clean JSON body and the bracket-encoded query strings that PHP, Express, Ruby on Rails and others expect.

Converts between JSON and GET query parameters: flatten nested objects into a query string such as a[b][0]=c, or rebuild JSON from it.

How to use it

  1. Choose the direction: JSON → GET params or GET params → JSON
  2. Paste the JSON or the query string
  3. Copy the converted result

A worked example

Fill in sample JSON

{"a":1,"b":{"c":2},"list":[1,2]}

Copy this into the tool, or open JSON to GET params

Things that trip people up

  • Nesting levels and array indices are both expressed with square brackets, e.g. items[0][name]
  • Fields whose value is null, an empty array or an empty object produce an empty value

Questions people ask

How is nesting expressed in the query string?
With square brackets, mirroring JavaScript member access: { "a": { "b": [1] } } becomes a[b][0]=1. Each level of object nesting adds a bracketed key, and each array index adds a numeric bracket, so the structure is fully recoverable on the way back.
What happens to null or empty values?
They produce an empty value in the query string (key= with nothing after). That is the faithful representation — a query string cannot encode "absence" more precisely than an empty field — so when rebuilding JSON the value comes back as an empty string rather than null. Drop such keys before sending if the server is strict.
Is the output URL-encoded?
The tool shows the logical key=value pairs; special characters in keys or values should be percent-encoded before putting them in a real URL. Encode the values (not the brackets) so the bracket structure stays intact and the server parses it correctly.

Next steps

Open the JSON to GET params tool

Spotted something wrong on this page? Tell us via Contact Us