Query String to JSON Converter
Parse URL query strings and convert them to JSON format with support for arrays, nested objects, and various encoding formats
Parsing Options
How to parse arrays in query strings
How to parse nested objects
Convert Query String
Recommended Settings
Array Format Tips
- •Brackets: Use key[] for simple arrays (e.g., hobbies[]=coding&hobbies[]=gaming)
- •Indices: Use key[0] for ordered arrays (e.g., items[0]=first&items[1]=second)
- •Repeat: Same key multiple times (e.g., tag=js&tag=react&tag=node)
- •Comma: Comma-separated values (e.g., colors=red,green,blue)
Nested Object Tips
- •Brackets: Use key[subkey] for nested objects (e.g., user[name]=John&user[age]=30)
- •Dots: Use key.subkey notation (e.g., user.name=John&user.age=30)
- •Auto-detect mode handles both formats automatically
- •URL encoding is automatically handled for special characters
Most Popular
Most APIs use bracket notation for arrays (key[]) and nested objects (key[subkey])
When to Use This Tool
Debug and inspect query parameters from API requests. When testing REST APIs or webhooks, quickly convert query strings from URLs into structured JSON to understand the data being sent. Useful for troubleshooting issues with GET request parameters.
Parse form submissions that use URL-encoded format. HTML forms submitted with GET method or application/x-www-form-urlencoded content type produce query strings. Convert these to JSON for easier processing, validation, or storage in your application.
Analyze and document URL structures for web applications. Extract and visualize all parameters from complex URLs with multiple query parameters. Helpful for understanding third-party API URLs, tracking parameters, or analytics tags.
Create test data or documentation examples from query strings. Convert actual API request URLs into structured JSON examples for technical documentation, API specifications, or test suites. Makes it easier to understand parameter relationships.
How It Works
Paste your query string into the input field (leading ? or # are automatically stripped)
The tool detects array and object notation based on your selected parsing options
URL-encoded characters (%20, %2B, etc.) are automatically decoded to readable text
Array formats are detected: brackets key[], indices key[0], repeats, or commas
Nested objects are parsed from bracket key[sub] or dot key.sub notation
Duplicate keys are automatically converted to arrays (repeat format)
Empty values (key=) are preserved or skipped based on your settings
The resulting JSON is formatted with your chosen indentation (2 or 4 spaces)
Copy the JSON to clipboard or download as a .json file
100% Private
Files never leave your device. All processing happens locally in your browser.
Lightning Fast
Powered by URLSearchParams API + Custom Parser for optimal performance on modern browsers.
Secure
No data collection, no tracking, no sign-up required.
Frequently Asked Questions
How does the tool handle URL encoding?
All URL-encoded characters are automatically decoded using decodeURIComponent. This means %20 becomes a space, %2B becomes +, and all other percent-encoded characters are converted back to their original form. The tool handles encoding transparently - you don't need to do anything special.
What array formats are supported?
The tool supports four array formats: (1) Brackets: key[]=val1&key[]=val2, (2) Indices: key[0]=val1&key[1]=val2, (3) Repeat: key=val1&key=val2, (4) Comma: key=val1,val2,val3. Use auto-detect mode to handle multiple formats in the same query string, or choose a specific format for strict parsing.
Can it parse nested objects?
Yes! The tool supports both bracket notation (user[name]=John&user[age]=30) and dot notation (user.name=John&user.age=30). Both formats create nested JSON objects like {user: {name: 'John', age: '30'}}. Auto-detect mode handles both simultaneously.
Why are all values strings in the JSON output?
Query strings don't have type information - everything is text. The value '30' could be the number 30, the string '30', or even '030'. To preserve the original data exactly, all values remain strings. You can convert types in your application code based on your specific needs.
What happens with duplicate keys?
Duplicate keys are automatically converted to arrays. For example, tag=js&tag=react becomes {tag: ['js', 'react']}. This matches the 'repeat' array format and ensures no data is lost. If you prefer a different behavior, use a specific array format option.
How are empty values handled?
Empty values (key= or just key with no value) can be preserved as empty strings or skipped entirely. Use the 'Preserve empty values' option to control this behavior. When enabled, key= becomes {key: ''}. When disabled, keys with empty values are omitted from the output.