Query String Parser
Parse a URL query string into decoded key/value pairs and a JSON object.
- Runs locally in your browser
- No upload required
Try it
Supported formats
Privacy
Runs entirely in your browser. Your input is never uploaded, stored, or sent to a third party.
2 parameter(s); 2 distinct key(s).
How it works
- Reduced the input to its query string (dropping any scheme, host, path and fragment).
- Split on `&` and then on the first `=` in each segment.
- Decoded each key and value with `application/x-www-form-urlencoded` rules (`+` is a space, then percent-decode).
- Grouped repeated keys as arrays in the JSON object.
- A parameter with no `=` is treated as a key with an empty value.
- The JSON object lists a repeated key as an array of its values; the pair list keeps the original order.
- Decoded with the standard form-urlencoded rules; a malformed percent-escape is left as-is.
Methodology
- Reduce the input to the substring after the first `?` and before any `#`.
- Split into segments on `&`, then split each at the first `=`.
- Decode each component with form-urlencoded rules and group repeated keys.
Usage
- Paste a query string (or a full URL) into the input.
- Read the decoded key/value pairs and the JSON object.
- Copy the JSON for use in your code.
Examples
These are examples, not current values: they use fixed inputs, while the interactive tool computes live results in your browser.
Two simple parameters
{
"query": "?q=hello+world&page=2"
}Repeated key
{
"query": "tag=js&tag=css&q=x"
}A full URL
{
"query": "https://devplace.example/search?q=caf%C3%A9#results"
}Limitations
Form-urlencoded decoding
Query strings follow the `application/x-www-form-urlencoded` rules: pairs are separated by `&`, keys and values by `=`, a literal space is written as `+` or `%20`, and other reserved characters are percent-encoded.
This tool decodes those rules and groups repeated keys, which is the shape most server frameworks and URLSearchParams produce. If the same key appears several times it is shown as an array.
Frequently asked questions
- How are repeated keys handled?
- The pair list keeps every occurrence in order, and the JSON object groups a repeated key into an array of its values.
- Does it make a request?
- No. It parses the text you paste; it never contacts the URL.
Sources
Send feedback
Tell us if this tool helped, report a problem, or suggest a tool. Only the message you type is sent — never the input you used in the tool.
Was this tool useful?
Prefer to write to us directly? See the contact page.