How to use the Query String to JSON
Parse a query string to JSON in seconds:
1
Paste a URL or query string
Paste a full URL (https://example.com/search?q=hello&page=2) or just the query string portion (?q=hello&page=2 or q=hello&page=2). The tool extracts the query part automatically.
2
Click Parse
Get a structured JSON object with all parameters decoded. Repeated keys become arrays automatically.
3
Copy the JSON
Copy the parsed JSON for further processing, documentation, or use in code.
When to use this tool
Use Query String to JSON when you need to:
- →Debug an API request URL by parsing its query parameters into a readable JSON object
- →Convert URL search params to JSON for use in API testing tools like Postman or Insomnia
- →Understand what parameters a legacy URL-based form or redirect is sending
- →Extract and inspect query parameters from complex tracking or analytics URLs
- →Parse a URL query string in the browser without writing URLSearchParams code
Frequently asked questions
Q:Are percent-encoded characters decoded in the output?
Yes. All percent-encoded characters are decoded in the JSON output — %20 becomes a space, %40 becomes @, %2B becomes +, and so on. The + character used as a space encoding (common in HTML form submissions) is also decoded to a space.
Q:How are repeated query parameters handled?
Repeated keys are automatically grouped into a JSON array. For example, ?tag=api&tag=json&tag=free produces { tag: ['api', 'json', 'free'] }. Bracket notation (?tag[]=api&tag[]=json) is also recognized and produces the same array output.
Q:Can I paste a full URL instead of just the query string?
Yes. Paste the full URL including the protocol and domain (https://example.com/search?q=hello) and the tool automatically strips everything before the ? and parses only the query string portion.
Q:How are numeric and boolean parameter values handled?
Parameter values are coerced: numeric strings like page=2 become JSON numbers, and true/false strings become JSON booleans. This makes the output directly usable as a typed object in JavaScript or Python without additional parsing.
Q:What happens to parameters with no value (?flag&other=1)?
Parameters with no = sign or an empty value (?flag) are included in the JSON output with an empty string value: { flag: '' }. This preserves the presence of the key, which is semantically meaningful in many URL conventions.
Q:Can I parse query strings from tracking or analytics URLs?
Yes. Tracking URLs (UTM parameters, ad click IDs like fbclid or gclid) are standard query strings and parse cleanly into JSON. Percent-encoded values in tracking parameters (common in utm_content) are decoded automatically.