Query String Parser
Convert query strings and JSON objects both ways
Paste a query string or JSON object, choose a direction, then select Convert. Auto selects the direction; arrays become one JSON-text value.
The full guide also includes pitfalls, worked examples, snippets, FAQs, and related tools for checking results or troubleshooting.
About this tool
Convert a query string to JSON or serialize a JSON object into query parameters, then inspect and copy the key-value rows. Select Convert after editing. Auto selects JSON mode only when trimmed input begins with { and ends with }; choose the direction explicitly for ambiguous input. Query values remain strings, while non-string JSON values are serialized as JSON text. Input and direction are saved locally; Clear removes the draft.
Scenario Recipes
Build parameters for an API that accepts JSON text
Goal: Encode an object-valued filter as one query parameter.
- Select JSON → Query and enter {"filter":{"status":"open"},"page":2}.
- Select Convert. The result is filter=%7B%22status%22%3A%22open%22%7D&page=2.
- Confirm that the receiving API expects JSON inside filter. The converter does not expand objects into bracket syntax.
Result: Nested JSON values are serialized into individual string fields. Converting back returns those fields as strings; it does not restore their JSON types.
Production Snippets
Repeated query keys do not round-trip through JSON arrays
text
Query → JSON:
tag=api&tag=tools&page=2
{"tag":["api","tools"],"page":"2"}
JSON → Query using that object:
tag=%5B%22api%22%2C%22tools%22%5D&page=2
The array becomes one JSON-text value, not two tag fields.Suggested Workflow
Failure Clinic (Common Pitfalls)
A complete URL becomes part of a parameter name
Cause: Query mode reads the input as a query string and only removes one leading ?. It does not extract the search component from a full URL.
Fix: Paste only the part after ? and before #. Use URL Parser when you need to inspect the complete address.
Frequently Asked Questions
Does query parsing infer numbers, booleans or nested objects?
No. Values such as 2, true and null stay strings. Names such as filter[status] remain literal keys. Repeated identical keys are grouped into arrays in the JSON output.
How do spaces, plus signs and empty fields decode?
Query parsing applies one form-style decoding pass: + becomes a space and %2B becomes a plus. flag and flag= both have empty string values; a leading ? is accepted.
Will malformed percent escapes be rejected?
Not necessarily. URLSearchParams is permissive: malformed escapes can remain literal or decode with replacement characters. This page does not provide a strict URI-validation mode.
Which JSON values are accepted at the top level?
A JSON object is required. Arrays, strings, numbers, booleans and null at the top level are rejected in JSON → Query mode.
Keep browsing