JSON to query string converter
Gives you a string ready to put after ? in a URL or to send as a form body, plus an unencoded view for review.
Loading the tool…
Processing and privacy: The result is calculated inside your browser and your data is not sent to any server.
How to use it
- Enter json and array style.
- The result appears straight away and updates as you edit.
- Copy the result, or copy a link that keeps the same values to share it.
How it is calculated
Each value becomes a key=value pair and nested objects are written parent[child]=value. Arrays follow your choice: a=1&a=2, a[]=1, a[0]=1 or a=1,2. Encoding follows application/x-www-form-urlencoded: space becomes + and every character outside A-Z, a-z, 0-9 and * - . _ becomes %XX of its UTF-8 bytes.
Example
Inputs: Array style = Repeat a=1&a=2. Result: Encoded query string: q=%D8%B9%D8%B7%D9%88%D8%B1&page=2&tags=new&tags=sale&filter%5Bbrand%5D=Oud&filter%5BinStock%5D=true; Parameters: 6.
{
"q": "عطور",
"page": 2,
"tags": ["new", "sale"],
"filter": { "brand": "Oud", "inStock": true }
}q=%D8%B9%D8%B7%D9%88%D8%B1&page=2&tags=new&tags=sale&filter%5Bbrand%5D=Oud&filter%5BinStock%5D=true
Limits and caveats
- null becomes an empty value and true becomes the text true, because URLs carry no types.
- Empty arrays and objects produce no parameter.
Questions about this tool
Which array style should I pick?
Repeat (a=1&a=2) works with most servers, brackets (a[]=1) suit PHP and Rails, and comma suits APIs that expect a comma-separated list.
Why do brackets show as %5B and %5D?
Standard encoding escapes brackets. Servers decode them automatically, and the readable view shows them unescaped.
Does it use + or %20 for spaces?
It uses +, like URLSearchParams and browser forms; both decode to a space in query parameters.
