Query String ↔ JSON

Convert a URL query string to JSON and back. Repeated keys become arrays, all done locally in your browser.

Paste a URL's query string to see it as structured JSON, or paste JSON to generate a properly encoded query string, handy for debugging API requests, reverse-engineering an endpoint's parameters, or building a URL by hand without fumbling ampersands and percent-encoding.

How to use it

  1. Paste a query string (with or without the leading ?) or a JSON object into either side
  2. Watch it convert instantly in the other panel as you type
  3. Copy the JSON or the encoded query string to use in your code or URL

Frequently asked questions

Does it handle nested objects and arrays?
Yes. Bracket notation like user[name]=Alex&tags[]=a&tags[]=b converts to nested JSON objects and arrays, and converts back the same way.
What happens to duplicate keys like ?color=red&color=blue?
Repeated keys are collected into a JSON array automatically, so color=red&color=blue becomes {"color": ["red", "blue"]}.
Are values automatically converted to numbers or booleans?
You can toggle type coercion on or off, with it on, page=2 becomes a number and active=true becomes a boolean; with it off, everything stays a string, which matches how query strings actually work on the wire.
Does it URL-encode special characters for me?
Yes, converting JSON to a query string automatically percent-encodes spaces, symbols, and unicode, and the reverse direction decodes them back.