All Tools
T

Query String Parser / JSON Converter

Parse query strings to JSON or serialize flat JSON objects back to query strings.

Read the full guide for this tool
Query parsing follows browser form-style behavior: a leading ? is optional, repeated keys stay repeated, and + decodes to a space.
JSON to query string supports flat objects only. Scalars become one param, arrays of scalars become repeated keys, nested objects are rejected, and null becomes an empty value.

Query String Parser / JSON Converter: Inspect URL Params Without Guessing

This query string parser turns raw URL parameters into readable structured data and converts JSON back into a query string without leaving the browser. Paste utm_source=newsletter&page=2&tag=astro&tag=seo and see what the parameter set actually contains. Paste a full URL like https://example.com/search?q=astro+seo&tag=docs&tag=guide and it reads the query part after ?. Paste a flat JSON object like {"utm_source":"newsletter","page":"2"} and generate a query string you can drop into a link, redirect, or test request.

The useful part is not the syntax transformation. It is seeing where data shape changes. Query strings are flat key/value pairs with loose conventions for arrays and repeated keys. JSON is explicit about strings, arrays, objects, booleans, and numbers. Moving between those formats is where bugs show up: repeated keys collapse, + becomes space, nested objects get stringified, or a backend expects tag[]=a&tag[]=b while your frontend sends tag=a&tag=b.

This tool handles those conversions locally in your browser. No request payloads, auth callback URLs, search parameters, or customer data get uploaded anywhere. That matters when you're debugging signed URLs, internal admin links, or production query parameters copied from logs.

What this query string to JSON tool actually does

On the parsing side, a query string parser reads the part after ?, splits it into key/value pairs, decodes percent-encoding, and groups repeated keys. sort=asc&filter=active&tag=js&tag=ts can reasonably become:

{"sort":"asc","filter":"active","tag":["js","ts"]}

On the conversion side, JSON to query string does the reverse. A flat object like {"sort":"asc","filter":"active"} becomes sort=asc&filter=active. Arrays may become repeated keys, bracket notation, or comma-joined values depending on the convention you choose in code. This tool is honest about that ambiguity: there is no single universal array format for query params.

That is also why a URL params parser is not the same thing as a full JSON serializer. Query strings do not have a standard native representation for nested objects like {"filters":{"status":"active"}}. Some frameworks flatten nested keys into filters[status]=active; others expect dotted keys like filters.status=active; others do not support nesting at all.

Using it

Paste a raw query string, full URL, or JSON object into the input. Choose the conversion direction: query string to JSON or JSON to query string. When you paste a full URL, only the query section after ? is parsed. Review the output, especially repeated keys and array-like fields, then copy the result.

If you're parsing a full URL such as https://example.com/search?q=astro+seo&tag=docs&tag=guide, the important part is the query section after ?. If you're converting JSON, keep the input flat unless you intentionally want nested values serialized as strings.

When you would use a URL params parser

Repeated keys, arrays, and missing values

Repeated keys are the main place query params to JSON stops being trivial. tag=js&tag=ts might mean an array. It might mean "last one wins." It might mean the backend only reads the first value. JavaScript's URLSearchParams.get() returns the first match, while URLSearchParams.getAll() returns all of them. If your application uses repeated keys, always verify which behavior your server and client libraries implement.

Empty and key-only parameters are another source of confusion. debug= has an explicit empty value. debug without = is often treated as an empty string too, but not every parser agrees. This tool shows the data plainly so you can spot those differences before they become edge-case bugs.

JSON to query string limitations

JSON can express data that query strings cannot represent cleanly. Numbers and booleans often end up as strings because URL parameters are text: {"page":2,"draft":false} usually becomes page=2&draft=false, and downstream code decides whether those should be parsed back into a number and boolean.

Nested JSON is even less portable. {"filters":{"status":"active"},"tags":["js","ts"]} has no single standards-based query string form. Some stacks want filters[status]=active&tags[]=js&tags[]=ts; some want repeated keys; some expect a JSON blob inside one parameter like filters=%7B%22status%22%3A%22active%22%7D. Round-tripping complex JSON through a query string is possible, but it depends on application conventions, not a universal spec.

Troubleshooting

Why did + turn into a space? — In form-style query strings, + is commonly decoded as a space. A literal plus sign should be encoded as %2B if you need it preserved.

Why did repeated keys become an array here but not in my app? — Query string parsers make different choices. Some preserve all values, some keep the first, and some keep the last. Compare the tool output with your framework's parser or URLSearchParams.getAll() behavior.

Why doesn't nested JSON round-trip cleanly? — Query strings are fundamentally flat. Nested objects and arrays require conventions like bracket notation or custom serialization rules, so the same JSON can produce different valid query strings.

Why are numbers and booleans quoted in JSON output? — Query parameters are text. A query string parser cannot know whether 42 should stay a string or be coerced into a number unless a specific parser adds type inference.

Why does decoding fail on some pasted values? — The input likely contains malformed percent-encoding such as an incomplete % escape, or a copied URL fragment that mixes encoded and unencoded characters.

Why do keys like toString or __proto__ work here? — This tool treats query keys literally, so names that happen to match JavaScript object property names are parsed the same as any other key.