Code tool

Query String to JSON

Paste a query string, choose whether to infer numbers, booleans, and null, then create JSON locally without sending a request.

In-browser processingNo account requiredPrivacy details ↗

A leading ? is optional. + decodes as a space; use %2B for a literal plus.

A QUICK WALKTHROUGH

How to use this tool

  1. Paste a query string with or without a leading question mark.
  2. Choose type inference and pretty output options.
  3. Review and copy the JSON result.

URL query semantics

Parsing uses URLSearchParams. A plus sign represents a space and percent encoding is decoded. Empty values remain empty strings; repeated keys become arrays in encounter order.

Optional type inference

With inference enabled, exact true, false, null, and finite decimal strings become JSON values. Otherwise every decoded value remains a string.

GOOD TO KNOW

Common questions

What happens to repeated keys?

The first value is a scalar; a repeated key becomes an array containing all values in order.

Are plus signs decoded?

Yes. URLSearchParams treats + as a space in query strings; use %2B for a literal plus sign.

Does it send a request?

No. The string is parsed locally and never fetched.