Query String Parser — Parse URL Query Strings to JSON
Parse URL query strings to structured JSON. Handles nested params, arrays, and encoding — runs in your browser, no upload.
Query String Parser
Parse URL query strings to JSON. Auto-detects types (numbers, booleans). Works entirely in your browser.
The query string is the least-loved part of every URL. It sits after the ?, it carries the parameters that the page needs but the user does not, and in production it can grow into a dense, nested, percent-encoded mess that no human can read at a glance. A query string like search?filters[category][]=books&filters[price][min]=10&filters[price][max]=50&sort=relevance&page=1&limit=25 encodes a structured query with nesting and arrays, but reading it raw gives you no sense of that structure. The parser decompresses that mess into a formatted JSON tree in one paste.
The bracket notation that PHP popularised in the early 2000s became the de facto standard for encoding nested parameters in URLs. Rails adopted it, Express.js middleware accepts it, and half the REST APIs on the web produce it. The flat-mode parser gives you a simple key-value map for debugging a straightforward API call. The nested-mode parser reconstructs the intended object hierarchy from the bracket notation, which is what you want when you are debugging a parameter that is 5 levels deep and the bug is that one parent key is misspelled.
The practical workflow is a DevTools debugging session. You copy a request URL from the Network tab — a 300-character string with a long query string — and you need to check whether a specific parameter was sent and what its value was. The parser extracts the query string, decodes the percent-encoding, and presents the parameters as a searchable, collapsible tree. No manual splitting on ampersands, no guessing which percent-sequence decodes to which character, no missing a duplicated key because you scanned past it in the raw string.
How to use
Paste a query string
Paste a full URL or just the query string portion. The parser extracts everything after the `?` and decomposes it into a flat or nested JSON object. Full URLs are auto-split — the path and hash are shown in separate panels.
Choose a parsing mode
Flat mode maps `a=1&b=2` to `{"a": "1", "b": "2"}`. Nested mode uses bracket notation (`a[b]=1` → `{"a": {"b": "1"}}`). Array mode maps repeated keys (`a=1&a=2`) to JSON arrays (`{"a": ["1", "2"]}`).
Copy or inspect the result
Copy the JSON to your clipboard, or use the interactive tree view to expand nested objects. The tree view is the right pick for long query strings with deeply nested parameters.
Frequently asked
How does it handle URL-encoded characters?
The parser auto-decodes percent-encoded characters (`%20` → space, `%26` → ampersand) before building the JSON output. Double-encoded values (`%2520` → `%20`) are decoded once, producing literal `%20` in the output. If the input is not encoded, the parser leaves it as-is.
What happens if the same key appears multiple times?
In flat mode, the last value wins — `a=1&a=2` produces `{"a": "2"}`. In array mode, repeated keys are collected into a JSON array — `{"a": ["1", "2"]}`. The mode toggle lets you pick the behaviour that matches the server framework you are debugging.
How are empty parameters handled?
A key with no value (`a=&b=2`) produces an empty string: `{"a": "", "b": "2"}`. A key with no equals sign at all (`a&b=2`) is treated as a boolean flag in flag mode (`{"a": true, "b": "2"}`) or as a key with empty value in strict mode.
Can it parse a query string from an OAuth redirect URI?
Yes. OAuth redirects often include fragments (hash) — the parser separates the fragment from the query string. For implicit-grant OAuth flows where tokens are in the fragment, paste the fragment into the URL hash panel separately.
Does it validate parameter names or values?
No — the parser extracts the structure as-is. It does not validate parameter names against a schema, check value types, or enforce character sets. For validation, pipe the output through a JSON Schema validator or the NDJSON Validator tool.
Limitations
- No type inferenceAll values are returned as strings by default. Toggle the type inference option to convert integer-looking, float-looking, and boolean-looking strings to their JSON types. The inference is best-effort and may misclassify string values that look like numbers.
- Nested bracket notation varies by frameworkThe bracket-nesting mode follows the PHP/Rack convention: `a[b][c]=1` → `{"a": {"b": {"c": "1"}}}`. Express.js and Django use slightly different conventions for nested parameters — the parsing may need adjustment for non-PHP frameworks.
- No support for very long query stringsQuery strings exceeding a few thousand characters parse correctly but the tree view may become unwieldy. For debugging massive query strings, switch to the JSON tab and scroll to the relevant section.
Platform notes
- macOS
- For command-line inspection, `node -e 'console.log(new URLSearchParams(`...`))'` extracts keys. The browser tool adds the nested-parameter parsing and the interactive tree view.
- Web
- Runs entirely client-side. The query string stays on your device.