Query String Parser

Runs in browser Web

Turn ?a=1&b[]=2 into a readable table or JSON, edit parameters, and rebuild a correctly encoded query string.

Privacy: This tool runs entirely in your browser. Your input never leaves your device.
Loading tool…

How to use Query String Parser

  1. Paste a query string or a full URL.
  2. Inspect the parameter table (position, key, value, bracket path, raw form) and the JSON view.
  3. Pick the array style and encoding your API expects and copy the rebuilt query string.

Query String Parser features

  • Parses ?, & and ; separated parameters with percent- and plus-decoding
  • Repeated keys become arrays; key[] and key[a][b] bracket notation becomes arrays and nested objects
  • Optional type detection (numbers, booleans, null) in the JSON view
  • Rebuilds the query in four array styles (repeat, brackets, indices, comma) and two encodings (RFC 3986, form)
  • Shows the original order re-encoded alongside the structured rebuild, with optional key sorting
  • Accepts a full URL and extracts only the query part

Query String Parser example

Parse bracket arrays and rebuild with repeated keys

Input:

?tags[]=new&tags[]=sale&filter[price][max]=50&q=caf%C3%A9+latte

Output:

JSON: {"tags":["new","sale"],"filter":{"price":{"max":50}},"q":"café latte"}
Rebuilt (repeat style): tags=new&tags=sale&filter%5Bprice%5D%5Bmax%5D=50&q=caf%C3%A9%20latte

Frequently asked questions about Query String Parser

How are repeated keys handled?

ids=1&ids=2 becomes an array ["1","2"] in the JSON view, and both entries stay visible in the table with their position. The rebuilt query uses the array style you select (repeat, brackets, indices or comma).

What does filter[price][max]=50 turn into?

Nested objects: {"filter":{"price":{"max":"50"}}}. Keys ending in [] become arrays, exactly as PHP, Rails and the qs library interpret them.

What is the difference between %20 and + for spaces?

RFC 3986 percent-encodes a space as %20. HTML form encoding (application/x-www-form-urlencoded) uses +. Both are decoded as a space when parsing; choose the encoding your API expects when rebuilding.

Can I paste a full URL?

Yes. When the input looks like a URL, only the part after ? is parsed and the fragment (#…) is ignored.

Technical notes

Decoding uses decodeURIComponent after turning + into spaces, falling back to the raw text for malformed sequences instead of throwing. Bracket paths are parsed with a small grammar (name followed by [segment]* ) matching PHP and the qs library; numeric segments become array indices.