JSON to Query String
Build a URL-encoded query string from a JSON object, with arrays and nested objects supported.
Paste or drop
Paste text below, or drop a file instead.
Choose an output
Build a URL-encoded query string from a JSON object, with arrays and nested objects supported.
Fine-tune
Optional — sensible defaults are already set.
About JSON to Query String
This tool builds a URL-encoded query string from a JSON object. Each value is percent-encoded, nested objects are written with bracket notation like filter[status]=open, and arrays become repeated keys, optionally with a [] suffix.
When it helps
- Constructing a GET request URL for an API from a JSON set of filters.
- Generating links with tracking or search parameters for documentation or tests.
- Encoding a form body for application/x-www-form-urlencoded requests.
Tips
- Without the [] option, an array becomes tag=a&tag=b, which most frameworks read as a list. Turn on "Use key[] for arrays" for PHP and Rails style tag[]=a&tag[]=b.
- Brackets in keys are left readable rather than encoded as %5B and %5D, which servers accept either way.
- Spaces are encoded as %20. Null values become an empty value, as in key=.
- The output has no leading ?, so add one when appending it to a URL.
Good to know
Quick answers about json to query string in your browser.
No. Repeated keys, key[] and comma-separated values are all in use. Check what your server framework expects; this tool supports the first two.
The HTTP specification sets no limit, but browsers, servers and proxies do. If your encoded data is large, send it in a POST body instead.
Yes. There is no sign-up, no watermark and no limit on how many files you process.
No. Files are read and processed locally in your browser, so they never leave your device.
Related tools
Part of the JSON, YAML & XML Tools collection.