Category: Developer tools

JSON to Query String

System ideaMissing a tool?

Convert a JSON object into a URL query string

Convert a flat or nested JSON object into a URL-encoded query string, with a choice of how arrays are represented: a repeated key, bracket notation, or a comma-joined value. Runs entirely in your browser.

Query string
q=local%20tools&page=2&tags=css&tags=json&sort%5Bby%5D=date&sort%5Bdir%5D=desc

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

Building a query string by hand from a JSON payload means getting encoding, array representation and nested keys right every time, and APIs disagree on the array convention they expect. This tool walks your JSON object recursively, turning nested objects into `parent[child]` keys and arrays into whichever of the three common conventions you choose, then percent-encodes every key and value the way `encodeURIComponent` does.

How to use it

  1. Paste or edit a JSON object, or load the example.
  2. Choose how arrays should be written: repeated key, brackets, or comma-joined.
  3. Copy the generated query string.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

Is my JSON uploaded anywhere?
No. The conversion happens in JavaScript running in the page, so nothing you paste ever leaves your device.
What does the top-level JSON value have to be?
An object, such as `{"page": 2}`. A top-level array or scalar isn't a set of named parameters, so it's rejected with a message rather than guessed at.
How are nested objects handled?
A nested object becomes bracketed keys, so `{"sort":{"by":"date"}}` becomes `sort[by]=date`, matching the convention most backend frameworks parse automatically.