How to Convert a Query String to JSON (and Back)

By Ramanathan Aug 25, 2026 1 min read Query String to JSON Converter

A URL query string — the part after the ? — is a flat list of key/value pairs. Turning it into JSON makes it easy to read and manipulate; turning JSON back into a query string helps you build URLs. Here's how the conversion works.

Pairs become properties

Each key=value pair becomes a property, with percent-encoding and + decoded:

name=Ada+Love&role=admin
{ "name": "Ada Love", "role": "admin" }

A leading ? is ignored, so you can paste a full query string or just the part after the ?.

Repeated keys become arrays

When a key appears more than once — or uses a [] suffix — the values collapse into an array so nothing is lost:

role=admin&role=dev&tags[]=a&tags[]=b
{ "role": ["admin", "dev"], "tags": ["a", "b"] }

Bracket notation nests objects

Bracket notation parses into nested objects, to any depth:

filter[status]=open&filter[sort][by]=date
{ "filter": { "status": "open", "sort": { "by": "date" } } }

Converting JSON back to a query string uses the same convention — nested objects become parent[child] and arrays become repeated key[] pairs.

Values stay strings

Query strings carry only text, so every value is kept as a string (page=2 is "2"). That keeps the conversion reversible: JSON → query string → JSON gives you back what you started with.

Related

Working with URLs? See URL Encoding Explained and TOML to JSON.

Try it

Paste a query string or JSON and convert instantly — everything runs in your browser, nothing uploaded.

About the author

Ramanathan · Software Engineer & Solutions Architect

I'm a Software Engineer and Solutions Architect with 20+ years of experience building enterprise applications across BFSI, Healthcare, Retail, Manufacturing, and Industrial Automation. I've spent those two decades living in JSON, tokens, regexes, and config files — so I built the fast, private, no-login developer tools I always wanted to reach for myself.

Last updated: Aug 25, 2026