Paste a query string — or a whole URL, which is how it usually arrives — and get readable JSON. Repeated keys become an array, because a=1&a=2 genuinely means a list and any tool that keeps just one of them is losing your data. Going the other way, you choose how arrays are written: repeated keys, bracket notation, or comma-joined, since servers disagree about which they accept. Type coercion is optional and conservative: turn it on and numbers and true/false become real types, but a leading-zero code like 007 stays a string and a long ID is not rounded into a float. Spaces are written as %20 rather than plus, which is valid everywhere rather than only in a form body. Parsing uses the browser's own URLSearchParams, so encoding edge cases behave exactly as they do in a real request.
| Format | Written as | Used by |
|---|---|---|
| Repeated key | a=1&a=2 | The default almost everywhere |
| Bracket | a[]=1&a[]=2 | PHP, Rails — expresses a one-item list |
| Comma | a=1,2 | Compact APIs that split on commas |
No. Everything is parsed in your browser, which matters because query strings routinely carry tokens and session identifiers.
Yes. The query is taken from it and the fragment after # is dropped. A bare query string with or without a leading ? works too.
They become an array. Repeated keys are legal and mean a list, so keeping only the first or last would silently discard values — a common failure in hand-written parsers.
Because a single repeated key is indistinguishable from a plain value in that format. Use bracket notation — a[]=1 — if you need a one-item array, which is exactly the distinction brackets exist to express.
Because it is a code, not a number, and converting it to 7 destroys it. Only plain numeric forms convert, and integers beyond the safe range stay strings too, so long IDs are not silently rounded.
Plus means space only in a form-encoded body. In other contexts a reader may take it as a literal plus, so a value would arrive wrong. %20 is correct in both, which makes it the safer default.
Parsing goes through URLSearchParams, the browser's own implementation, which means percent-decoding, plus-as-space and every encoding edge case are handled by the same code that handles real navigation rather than by a hand-written splitter that gets one of them wrong. A pasted whole URL has its query extracted and its fragment dropped, and a leading question mark is removed, because that is how a query string actually arrives from an address bar. Repeated keys are collected into an array: a=1&a=2 is legal and means a list, and every implementation that keeps only the first or last silently loses data. Bracket keys are recognised so a[]=1 yields an array even with a single value, which is the distinction a repeated-key format cannot express. Type coercion is off by default and deliberately conservative when on — only plain numeric forms and the two boolean literals convert, so a leading-zero code like 007 stays a string and a long identifier is not rounded into a float, which is the standard way this kind of tool corrupts an ID. Writing a query string, the output encodes a space as %20 rather than the plus that URLSearchParams emits: plus means space only in a form body, and in other contexts a reader may take it literally, while %20 is correct in both. Nested objects are serialised as JSON into their value rather than flattened, since there is no single agreed bracket convention and guessing would produce a string the receiving server does not parse. Everything runs in your browser.