What is Query String Parser

The Query String Parser is a client-side tool that decomposes URL query strings into structured key-value pairs. Paste any query string (with or without the leading ?), and the tool parses it using the browser's URLSearchParams API, which handles URL decoding, repeated parameters (converted to arrays), and edge cases like empty values and encoded characters. The output is formatted as a JSON object where each key maps to its value (or an array of values if the key appears multiple times). The tool also shows a count of total parameters. This is essential for debugging API requests, understanding URL structure, and verifying that form submissions are generating the expected query parameters.

How to Use Query String Parser

  1. Step 1: Paste a query string into the input field. It can start with ? or not (both are handled). Example: ?search=test&page=2&sort=name
  2. Step 2: Click Transform. The parser decodes URL-encoded characters and structures the parameters.
  3. Step 3: The output shows a JSON object with each parameter as a key and its value. Repeated keys appear as arrays.
  4. Step 4: The info bar shows the total number of unique parameters found.

Why Use Query String Parser

Query strings are the most common way to pass parameters in URLs, but they are easy to construct incorrectly — forgetting to URL-encode special characters, using the wrong delimiter, or accidentally duplicating keys. The Query String Parser validates and decodes query strings instantly, showing you exactly what a browser or server would see when processing the URL. This is invaluable when debugging API requests that are not behaving as expected, verifying that OAuth callback URLs contain the correct parameters, and understanding the structure of URLs shared by colleagues or found in documentation.

Privacy & Security

This tool runs entirely in your browser — no data ever leaves your device. There is no server round-trip, no upload, no logging, and no account required. Your input is processed locally using client-side JavaScript and is never stored, transmitted, or accessible to anyone else. When you close the tab, everything disappears.

Frequently Asked Questions

Does it handle array notation (key[]=value)?

<p>The tool uses the standard URLSearchParams API, which does not natively support PHP-style array notation (key[]). Duplicate keys (key=1&key=2) are handled as arrays.</p>

Can I parse a full URL, not just the query string?

<p>The tool parses query strings only. For full URL parsing, use the URL Parser tool, which decomposes protocol, hostname, path, query, and fragment.</p>

What about encoded characters?

<p>The URLSearchParams API automatically decodes URL-encoded characters. %20 becomes a space, %26 becomes &, etc.</p>

What is the difference between ? and &?

<p>? marks the beginning of the query string (appearing once after the path). & separates individual parameters within the query string. The parser handles both the leading ? and internal & delimiters.</p>

Can I parse URL-encoded values?

<p>Yes. The URLSearchParams API automatically decodes percent-encoded values. %20 becomes a space, %26 becomes &, and %3D becomes =. The output shows the decoded values.</p>

What about hash fragments?

<p>The parser processes query strings only. Hash fragments (#section) are separate from query parameters and are not included in the query string parsing.</p>

What does the JSON output format look like?

<p>The output is a JSON object where each key maps to its value string, or to an array of strings if the key appears multiple times. Example: {"search": ["react"], "page": ["1"]}.</p>

Can I use this for debugging API calls?

<p>Absolutely. When an API request has unexpected behavior, paste the query string to verify that all parameters are present, correctly encoded, and have the expected values.</p>