JSON ⇄ Query String Converter
Convert a flat JSON object to a query string (?a=1&b=2) and vice versa. Supports a[]=1&a[]=2 array style. Everything in your browser.
JSON → Query String
Query String → JSON
Convert between JSON and query string
A URL's parameters, that query string in the ?a=1&b=2 format, and a JSON object hold the same information in different clothing. You go back and forth between the two constantly in web development, and this converter translates in both directions.
Take a flat JSON object and turn it into a query string already fit for the URL, or do the opposite and parse the parameters back into an object. It even tackles arrays in the a[]=1&a[]=2 style, exactly the kind of detail that gives you a headache by hand. Good for building links, debugging requests or reading a URL's parameters.
It all runs in the browser, with nothing sent out. Paste the JSON or the query string and grab the equivalent format, ready to use.
Frequently asked questions
Does it convert JSON with an object inside an object?
Why does ?a=1 come back as the text "1" instead of a number?
The output froze and won't change any more. What happened?
Related Tools
URL Encode / Decode
Encode text for safe use in URLs (percent-encoding) or decode URL-encoded strings back to the original. Processed in the browser.
YAML to NDJSON Converter
Explains how to represent YAML lists as NDJSON (one JSON object per line) with practical examples.
JSONP to JSON Converter
Strips the callback wrapper of a JSONP response leaving only the JSON contained inside the parentheses.
BSON to JSON (text) Converter
Explains differences between binary BSON and JSON with a type table and textual conversion examples.
Fixed-Width ↔ CSV/JSON Converter
Converts fixed-width text files to CSV, TSV or JSON and back, with automatic column detection, a position map and per-line warnings.
JSON to PHP Array
Convert JSON to a PHP array in "short" (`[]`) or "long" (`array()`) syntax. Useful to generate config and seed files in Laravel/Symfony projects. Everything in your browser.