JSON to query string
Paste or drop your data here, or open a file.
New to Bracely?
Everything stays in your browser.
Output appears here
Paste or open your data in the input box. It never leaves your browser.
JSON to Query String
Turn JSON into URL parameters like filters[brand]=x&page=2, or switch direction to read the parameters of any URL as JSON.
Example: search filters as URL parameters
A search form's state as JSON, with a nested filters object and an array. Nested keys use brackets, the array is written as filters[size][0] and filters[size][1], and the space is encoded:
Input
{
"q": "red shoes",
"filters": {
"brand": "puma",
"size": [
8,
9
]
},
"page": 2,
"inStock": true
}Output
q=red%20shoes&filters[brand]=puma&filters[size][0]=8&filters[size][1]=9&page=2&inStock=true
How do I use the JSON to query string?
- Paste JSON, or choose Query string → JSON and paste a URL.
- Choose how arrays are written.
- Copy the result.
What does the JSON to query string do?
- Nested objects with bracket keys
- Three array styles: a[0]=x, a[]=x or a=x&a=y
- Numbers and booleans detected when reading
When to use the JSON to query string
Search pages, filters and GET APIs keep their state in the URL. Turning a JSON object into a query string is how you build those links from code, tests or a design doc, and reading a long URL back as JSON is the quickest way to see what a page or tracking link actually sends.
Nested objects use bracket keys (filters[brand]=puma), which PHP, Rails, Express's qs and most web frameworks read back as nested objects. Arrays can be written three ways: a[0]=x with indexes, a[]=x, or a=x&a=y repeated; pick the one your server expects. Reading goes the other way: paste a whole URL, and numbers and true/false become JSON values unless you keep everything as text.
Frequently asked questions
- Which array style should I use?
- Use whatever the server parses: a[]=x is PHP's and Rails's style, a=x&a=y suits Go, Python and many APIs, and a[0]=x keeps the order explicit. If unsure, try reading your server's own URLs with Query string → JSON.
- Why aren't the brackets encoded?
- Brackets in parameter names are left as [ ] because servers read them that way and the URL stays readable; browsers send them fine. Values are fully encoded.
- Can I paste a whole URL?
- Yes. When reading, everything before the ? is ignored.
- Is my data uploaded?
- No. Bracely runs entirely in your browser, so nothing you paste or open leaves your device.
More JSON tools
Bracely has 108 JSON tools in one page. Related ones:
- JSON to plain text
- cURL to JSON
- Postman collection viewer
- BSON to JSON
- Number base converter
- Colour converter
- ENV ⇄ JSON
- cURL to code
- GraphQL request
- MessagePack ⇄ JSON
- Parquet viewer
- Avro viewer
- JSON to BSON
- JSON to MessagePack
- OpenAPI to TypeScript
- GraphQL to TypeScript
- Unix timestamp converter
- Filter JSON fields
- JSON Formatter
- JSON Validator
- JSON Viewer
- JSON Repair
- JSON Diff
- jq Playground
Runs entirely in your browser. Nothing you paste is uploaded. Made by Saurabh Pagrut · About · Privacy policy
Last updated · Version 6.7 · Changelog
Saurabh Pagrut on GitHub · LinkedIn · X · YouTube · Instagram