JSON Converter
URL to JSON converter online. Convert URL query strings to JSON objects and back. Handles nested parameters—free query string converter.
Query String
JSON Object
Features
- Convert query strings to JSON objects
- Convert JSON objects to query strings
- Array support: repeated params become arrays in JSON
- Handle nested parameters and objects
- Auto-decode: URL-encoded values are decoded
- Bidirectional: convert either direction
Common Use Cases
- Convert form data to JSON for APIs
- Transform API responses to query strings
- Debug request/response formats
- Migrate between URL and JSON formats
- Build query strings from JSON config
Query String and JSON Conversion
Query string to JSON conversion transforms URL parameters into structured JSON objects, and vice versa. This is useful for API development and data transformation.
Query to JSON:
?name=John&age=25&tags[]=red&tags[]=blue
↓
{
"name": "John",
"age": "25",
"tags": ["red", "blue"]
}
JSON to Query:
{
"search": "javascript",
"filters": { "lang": "en", "year": 2024 }
}
↓
?search=javascript&filters[lang]=en&filters[year]=2024
Features:
- Array handling - tags[]=a&tags[]=b or tags=a&tags=b
- Nested objects - user[name]=John&user[age]=25
- Auto encoding - Values are URL-encoded automatically
Examples
Query: ?name=John&age=25&city=NYC
JSON:
{
"name": "John",
"age": "25",
"city": "NYC"
}Query: ?tags[]=javascript&tags[]=typescript
JSON:
{
"tags": ["javascript", "typescript"]
}JSON: { "q": "Hello World", "limit": 10 }
Query: ?q=Hello%20World&limit=10Frequently Asked Questions
Arrays use repeated keys (?tag=red&tag=blue) or bracket notation (?tag[]=red&tag[]=blue). The converter supports both formats and outputs consistent JSON arrays: {"tag": ["red", "blue"]}.
Yes! Nested objects use bracket notation: {"user": {"name": "John", "age": 25}} becomes ?user[name]=John&user[age]=25. This is common in PHP-style query strings and form submissions.
Yes. When converting JSON to query strings, special characters are URL-encoded. "Hello World" becomes Hello%20World. When converting query to JSON, values are automatically decoded.
Empty values in query strings (?key=) are converted to empty strings in JSON ({"key": ""}). In reverse, empty JSON strings become ?key=. null values are skipped.
JavaScript objects are unordered by spec, but modern engines preserve insertion order. The converter respects JSON key order when generating query strings, but query parameter order doesn't affect functionality.