JSON to Query String Converter
Generate a correctly encoded query string from a JSON object — including the nested and array cases that are easy to get wrong by hand.
Your data stays on your device
Input — JSON
- characters
- 0
- lines
- 0
- size
- 0 B
Output — Query string
- characters
- 0
- lines
- 0
- size
- 0 B
Options
Makes two documents comparable with a plain text diff.
About this tool
Query strings look simple until you need to encode a nested object or an array. There is no single standard: some servers expect tags=a&tags=b, others tags[]=a&tags[]=b, and frameworks like Rails and PHP use bracketed paths for nested objects. Choosing the wrong one produces parameters your backend silently ignores.
This converter lets you pick the convention and handles percent-encoding for every reserved character, so the result is safe to append to a URL.
How to use this tool
- Paste a JSON object into the input panel.
- Choose the array notation your backend expects: repeated keys, empty brackets, or indexed brackets.
- Decide whether to skip null and empty values and whether to include a leading question mark.
- Press Convert and copy the query string.
Key features
- Three array notations: repeated keys, tags[], and tags[0]
- Bracketed path flattening for nested objects
- Full percent-encoding of reserved and non-ASCII characters
- Option to skip null and empty values
- Optional leading question mark for direct URL appending
- Optional alphabetical key sorting for reproducible URLs
Example
Input — JSON
{"q":"blue chair","tags":["sale","new"],"page":2}Output — Query string
q=blue%20chair&tags=sale&tags=new&page=2Good to know
- Query strings have practical length limits — many servers and proxies cap the URL at around 2,000 characters. Large payloads belong in a request body.
- Array and nesting conventions are not standardised, so you must match whatever your server parses.
- Everything becomes text; type information is not carried in a query string.
Frequently asked questions
Which array notation should I use?
Repeated keys are the most widely understood and work with Express, Go and most Java frameworks. Bracket notation is expected by PHP and Rails. Indexed brackets preserve order explicitly when that matters.
How are nested objects encoded?
As bracketed paths, so {"user":{"id":3}} becomes user%5Bid%5D=3. That is the convention most server frameworks decode automatically.
Are spaces encoded as + or %20?
As %20, which is valid across the whole URL. The + form is specific to the form-encoded body content type and is not safe everywhere in a URL.
Should I put sensitive data in a query string?
No. URLs are logged by servers, proxies and browser history. Use a request body and a secure channel for anything sensitive.
Your data stays on your device
Your data is processed locally in your browser and is not uploaded to our server. This page keeps working after you go offline, because there is nothing to send.