AbraCalc

Query String to JSON Converter

Convert a URL query string to a JSON object instantly. Free, no signup.

Embed this tool on your site
Cite this tool

APA

AbraCalc. (2026). Query String to JSON Converter [Online calculator]. Retrieved from https://abracalc.com/generator/query-string-to-json/

BibTeX

@misc{abracalc-query-string-to-json, author = {AbraCalc}, title = {Query String to JSON Converter}, year = {2026}, howpublished = {\url{https://abracalc.com/generator/query-string-to-json/}} }

Did this tool answer your question?

How to use this tool

  1. Enter query string in the fields above.
  2. Results update instantly as you type — or click Calculate.
  3. Read your json output and the full breakdown beneath it.

Query strings are the key=value pairs after the ? in a URL. This tool converts them into a readable JSON object.

How it works

Query String to JSON Converter parses a URL query string and converts it into a structured JSON object, making it easy to read, debug, and work with URL parameters. A query string is the part of a URL after the ? symbol, such as name=Alice&age=30&active=true.

Paste a query string (with or without the leading ?) into the input field. The tool splits the string on &, decodes each percent-encoded key and value, and assembles them into a JSON object. Repeated keys are grouped into an array automatically.

This tool is useful for debugging web requests logged in your browser's network tab, understanding what parameters a form submits, or turning query strings from analytics tools and ad platforms into readable data. All processing happens in the browser so no URL data is transmitted anywhere.

Worked example

Decode a Google Ads tracking URL

  1. Copy the query string from a tracking URL: utm_source=google&utm_medium=cpc&utm_campaign=spring_sale&gclid=abc123
  2. Paste it into the Query string field.
  3. Click Convert.
  4. Read the resulting JSON object with clearly labeled utm_source, utm_medium, utm_campaign, and gclid fields.

{"utm_source":"google","utm_medium":"cpc","utm_campaign":"spring_sale","gclid":"abc123"}

Common mistakes to avoid

  • Pasting the full URL including the scheme and path without a ? separator: if there is no ?, the tool treats the entire string as one parameter key.
  • Expecting nested bracket notation (e.g., item[0]=a) to be expanded: the converter treats each key literally and does not parse PHP-style array brackets into nested JSON structures.
  • Forgetting that some special characters in values must be percent-encoded: if you paste a raw query string with a literal & inside a value, the tool will split it as a new parameter.

Key terms

Query string
The portion of a URL following the ? character, consisting of key=value pairs separated by & that pass parameters to a web page or API.
Percent encoding
A URL encoding scheme that replaces unsafe characters with a % followed by their hexadecimal code point (e.g., a space becomes %20).
Repeated key
A key that appears more than once in a query string, e.g., tag=a&tag=b. The converter groups these into a JSON array: {"tag":["a","b"]}.

Frequently asked questions

What is a query string?
A query string is the portion of a URL after the ? character, containing key-value pairs separated by & characters.

References & sources