100% In-Browser PrivacySub-ms Execution
Developer UtilitiesID: dev-query-parser
URL Query String Parser & Builder
Parse URL search parameters into formatted JSON, and construct encoded query strings from key-value pairs.
Parsed JSON Parameters
{
"utm_source": "google",
"utm_medium": "cpc",
"tag": [
"react",
"nextjs"
],
"page": "1",
"active": "true"
}Interactive Query Builder
?filter=active&sort=desc
Technical Specifications & Standards
Parses standard W3C `application/x-www-form-urlencoded` query strings into key-value pairs using `URLSearchParams`, automatically decoding percent-encoded sequences and grouping duplicate keys into arrays.
Verified Technical Example
Parsing a complex REST API search URL query string
queryString?page=2&limit=50&sort=desc&filter=active&tag=web&tag=tools
• Strips leading '?' delimiter
• Splits by '&' parameter delimiters and '=' key-value operators
• Decodes percent-encoded characters and aggregates duplicate 'tag' keys into an array
Expected Output:{
"page": "2",
"limit": "50",
"sort": "desc",
"filter": "active",
"tag": ["web", "tools"]
}
Frequently Asked Questions
How are duplicate query parameter keys handled?
When a key appears multiple times (e.g. `tag=web&tag=tools`), our parser automatically groups the values into a clean JavaScript array (`['web', 'tools']`).
Can I build a query string from key-value pairs?
Yes! The interactive Query Builder lets you add key-value rows and automatically generates the correctly encoded URL query string.
Does it strip the leading question mark ('?') automatically?
Yes. You can paste a full URL, a string starting with '?', or raw parameters directly.
Scope & Technical Limitations
- Deeply nested PHP-style bracket notation (e.g. `filter[user][id]=1`) is parsed as string keys.