Skip to content
AZ Tools

Query String to JSON Converter

Convert a URL query string to a JSON object and back, in your browser.

Output

How to use

  1. Choose the direction: query string to JSON, or JSON to query string.
  2. Paste your query string (with or without the leading ?) or JSON object.
  3. Copy the converted result from the output box.

About this tool

Show

Paste a query string — or a whole URL — and get a clean JSON object, with values percent-decoded and repeated keys collected into arrays. Switch direction to turn a JSON object back into an encoded query string. Parsing uses the browser's own URLSearchParams, so it behaves exactly as a server's URL layer will: a plus sign decodes to a space, and on the way back out spaces are encoded as plus signs again. One expectation to set: bracket syntax is not interpreted. A key written as items[] stays literally items[], and items[0][name] stays one long key, because the nesting conventions used by PHP, Rails and qs are framework habits rather than part of the URL standard. Everything runs locally — nothing is uploaded.

Frequently asked questions

How are repeated keys handled?

When the same key appears more than once (for example tags=a&tags=b), it becomes a JSON array. A key that appears once stays a plain string.

Can I paste a full URL?

Yes. Everything up to and including the ? is ignored and any #fragment is dropped, so you can paste a complete URL and still get just the query parameters.

How are nested objects converted to a query string?

Arrays are expanded into repeated keys. A nested object or array of objects is serialized to JSON and percent-encoded as the value, since query strings are flat key-value pairs.

Is my data sent anywhere?

No. The conversion happens entirely in your browser; nothing is uploaded.

Why is my key still called items[] instead of becoming an array?

Because bracket syntax is a framework convention, not part of the URL standard. PHP, Rails and the qs library each read items[] or user[name] as structure; a plain URL parser sees one literal key. Repeat the same key instead — items=1&items=2 — and it becomes an array here and almost everywhere.

Should a space be %20 or a plus sign?

Both decode to a space in a query string, which is why this accepts either and emits the plus form. In a path segment they are not interchangeable: %20 is a space and a plus sign is a literal plus. That difference is a common source of filenames that arrive with a stray plus in the middle.

Related tools