Skip to content
QuickTool logoQuickTool

Query String Parser

Convert query strings to JSON

Start

{
  "a": "1",
  "b": [
    "2",
    "3"
  ]
}

Description

The Query String Parser converts raw a=1&b=2 strings into structured JSON so you can inspect, debug, and reuse parameters across tools. It supports repeated keys and decoding of percent‑encoded values for readability.

Use this tool when pulling params from logs or when validating link tracking tags. You can choose whether to flatten single values into strings or keep arrays for consistent shapes.

Key features

  • Parses query strings with repeated keys
  • Options to decode values and flatten single‑value keys
  • Copy JSON output with one click
  • Local persistence of input and settings

Common use cases

  • Debugging UTM and analytics parameters
  • Converting ?a=1&b=2 into a JSON object for scripts
  • Teaching how query strings map to key–value pairs

Privacy & security: parsing runs entirely in your browser. Avoid pasting secrets into pages you don’t control.

How to Use

  1. Paste a query string such as a=1&b=2&b=3 into the input.
  2. Enable “Decode parameters” if you want %20 → spaces.
  3. Enable “Flatten single values” to convert single‑key arrays into strings.
  4. Review the JSON output on the right panel.
  5. Use “Copy Output” to copy the JSON to your clipboard.
  6. Use “Sample” to load demo parameters.

Tips

  • Remove any leading ? or keep it—both work.
  • For object‑like shapes, keep arrays for repeated keys.
  • Pair with the Query String Builder to round‑trip changes.

Troubleshooting

  • Empty output → The input is blank; paste a non‑empty string.
  • Unexpected arrays → Turn on “Flatten single values”.
  • Still encoded → Turn on “Decode parameters”.

Example

Example 1: Repeated keys

Input:

a=1&b=2&b=3

Output:

{
  "a": "1",
  "b": ["2", "3"]
}

Repeated keys become arrays to preserve all values.

Example 2: Decoding values

Input:

q=hello%20world

Output (decoded):

{
  "q": "hello world"
}

Percent‑encoded characters are converted to readable text.

FAQ

Is parsing local and safe?

Yes. Everything runs in your browser; nothing is uploaded.

Why is the output empty?

The input is blank or whitespace. Paste a non‑empty query string.

Why do I see arrays?

Repeated keys become arrays. Turn on “Flatten single values” to keep singles as strings.

Can I include the leading “?”

Yes. The tool accepts both forms and strips the prefix internally.

Does order of parameters matter?

JSON output does not guarantee order; value presence is the key.

Is there a size limit?

Browser memory limits apply; typical query strings parse instantly.