How to use “JSON and Query String Converter”

Paste a JSON object to get its query string, or paste a query string to get JSON back. Keys and values are percent-encoded, so spaces, ampersands and non-ASCII text survive the round trip.

The conversion runs in the page: the text you paste is parsed locally, never uploaded, and the result can be copied with one click.

  1. Paste a JSON object or a query string into the text area.
  2. Choose JSON to GET parameters to build a query string. Nested objects become bracket keys such as user[name], and arrays repeat the key as tags[].
  3. Choose Get Parameters to JSON to parse a query string — bare, starting with ?, or a full URL — into a formatted JSON object.
  4. Choose Copy Result to copy the output, or Clear to start again.

Background and accuracy

What is encoded and decoded

In the JSON direction every key and value is percent-encoded with encodeURIComponent: a space becomes %20, an ampersand %26, and 中文 becomes escaped UTF-8. null becomes an empty value, while numbers and booleans keep their literal form.

In the query direction the parser decodes + as a space and percent escapes as their original characters. A value containing = stays whole (a=b=c gives "b=c"), and a parameter without a value becomes an empty string.

Bracket keys and round trips

Nested JSON is flattened to bracket keys — {"user":{"id":1}} becomes user[id]=1 — and arrays repeat the key with [] (tags[]=a&tags[]=b). The reverse pass rebuilds the same objects and arrays, whether the brackets are written literally or percent-encoded.

Query values are text, so a round trip returns "1" for the number 1 instead of guessing types. Duplicate keys become an array, and a malformed percent escape is left untouched rather than failing the whole conversion.

Recent tools: