Query Params to JSON

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.

What is a query string?

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.

How to use Query Params to JSON

  1. Enter the input Paste a URL or query string into the URL or query string box.
  2. Click To JSON Parameters appear as a JSON object in the Result box.
  3. Or click JSON to query Paste a JSON object to get the query string.
  4. Copy or download Use the copy button or download params.json.

Frequently asked questions

How are repeated keys handled?

The values are collected into an array in order, so tag=a&tag=b gives an array of two strings.

Why are numbers shown as strings?

Query strings have no types, so every value is text and the tool leaves them unchanged.

Are plus signs decoded as spaces?

Yes, parsing follows form encoding, so a plus becomes a space and %2B becomes a plus.

Is the fragment included?

No. Text after # is removed before parsing.

How are nested objects handled in JSON to query?

Nested values are not expanded; an object value is converted to text such as [object Object]. Use flat objects or arrays of simple values.