Parse URL query parameters into JSON, handling repeated keys.
Parse a URL or a bare query string into JSON, or build a query string from a JSON object. Percent-encoding is decoded, and repeated keys become arrays. It helps when debugging request URLs, analytics links and API parameters, and works with full URLs or just the part after the question mark.
A query string is the part of a URL after the question mark, made of key=value pairs joined by ampersands, for example page=2&sort=asc. Special characters in keys and values are percent-encoded, and in form encoding a plus sign stands for a space. A fragment after a hash sign is not part of the query. The standard does not define arrays, so a repeated key like tag=a&tag=b is the common way to send multiple values. Parsers differ in how they treat repeated keys, which is why seeing the exact structure helps.
The values are collected into an array in order, so tag=a&tag=b gives an array of two strings.
Query strings have no types, so every value is text and the tool leaves them unchanged.
Yes, parsing follows form encoding, so a plus becomes a space and %2B becomes a plus.
No. Text after # is removed before parsing.
Nested values are not expanded; an object value is converted to text such as [object Object]. Use flat objects or arrays of simple values.