Network/HTTP
Query String ↔ JSON
Parse a URL query string into a JSON object, or build a query string back from JSON.
A URL's query string (the part after ?) is a flat set of key-value pairs, while JSON supports nested structures and data types. This tool converts between the two, including repeated keys and arrays.
How to use it
- Query → JSON: paste a query string (with or without the leading ?) to get a JSON object with decoded parameter values.
- JSON → Query: paste a JSON object to build a query string from it with correctly URL-encoded values.
- Repeated keys (a=1&a=2) are automatically recognized as an array in the JSON output.
Common uses
- Building query parameters from a JSON configuration object for an API request.
- Reading a complex query string with dozens of parameters in a structured, readable form.
- Debugging why a parameter isn't reaching the backend — checking its encoding and structure after conversion.
Things to keep in mind
Every value in a query string is text — "true", "false", or "42" stay strings in the JSON until code explicitly converts them to the right type.
Nested objects and arrays have no single standard query-string notation — different backend frameworks (PHP, Rails, Express) use slightly different syntax (a[b]=1 vs a.b=1).
Article about this tool: Query string vs. JSON: why GET parameters are so limited
Frequently asked questions
How does this tool handle repeated parameter names like ?tag=a&tag=b?
Repeated keys are typically collected into an array (tag: ["a", "b"]) rather than overwriting each other, matching how most backend frameworks parse query strings.
What happens to special characters during conversion?
Percent-encoded characters (like %20 for a space) are decoded back to their literal form when converting to JSON, and re-encoded when converting JSON back to a query string.
Is my URL or data sent anywhere to perform this conversion?
No. The conversion happens entirely in your browser — nothing is sent to a server.
What's the maximum safe length for a URL?
Roughly 2000 characters — the most conservative common limit among popular browsers and servers. For larger amounts of data, use a POST request with a body instead of a query string.
How do I pass a true/false value or a number through a query string?
A query string only ever stores text — values like "false" or "42" stay strings until server- or client-side code explicitly recognizes and converts them into a boolean or number.