Query String Parser & Builder
Parse URL query parameters or build a properly encoded query string in your browser.
Parse query parameters
Paste a query string such as ?name=Amir&role=developer&tag=web&tag=tools. The parser keeps parameters in their original order and preserves repeated keys as separate rows.
Build a query string
- Add a parameter row.
- Enter its name and value.
- Keep repeated names when the target API expects them.
- Click Build to serialize the rows with URLSearchParams.
Percent encoding and form serialization
The browser's URLSearchParams API handles decoding and serialization rather than a custom percent-encoding implementation. This keeps Unicode, repeated parameters, empty values, and special characters aligned with the platform API's behavior. Empty queries produce no rows, and empty names are preserved. A literal # starts a fragment and is excluded; use %23 for a hash within a value. Malformed percent escapes follow URLSearchParams: invalid escape text is retained, while invalid UTF-8 bytes decode to replacement characters. This is forgiving parsing, not strict encoding validation.
Frequently asked questions
- What does a leading question mark do?
- The parser accepts a leading ? and removes it before reading the parameters. It also accepts a complete URL and reads its search component.
- How are duplicate parameters handled?
- Duplicate keys are preserved as separate rows and remain separate when the query string is rebuilt. This avoids silently collapsing repeated parameters into one value.
- How are spaces encoded?
- The builder uses the browser URLSearchParams implementation, which follows application/x-www-form-urlencoded serialization. Spaces are represented as + in the resulting query string.
- Are Unicode values supported?
- Yes. URLSearchParams handles Unicode strings and percent-encodes them when building the query string.
- Does this tool analyze the whole URL?
- No. It focuses on the query component: parsing parameters or building a query string. It is not a full URL analyzer.