Skip to content

Query String Parser

Parse a URL query string into decoded keys and values. Inspect repeated parameters and copy the result as JSON.

Runs in your browser Free, no sign-up
Loading tool workspace...

What is Query String Parser?

Query String Parser turns the part of a URL after the ? into readable data. Paste a query string such as ?utm_source=google&tags=react&tags=nextjs&active=true and the tool lists every parameter as a decoded key and value, and also builds a JSON object in which repeated keys become arrays, for example "tags": ["react", "nextjs"].

It saves you from reading long, percent-encoded parameter lists by eye, whether you are checking marketing UTM tags, debugging filters sent to an API, or converting a query string into JSON for a test.

How to use Query String Parser

  1. Paste a query string (with or without the leading ?) or a list of key=value pairs joined by &.
  2. Read the decoded parameters in the key-value table, in their original order.
  3. Copy the JSON representation, where repeated keys are grouped into arrays.
  4. Edit the input to see the result update instantly.

Key features

  • Decodes percent-encoding and + as space
  • Key-value table in original parameter order
  • JSON output with repeated keys grouped into arrays
  • Accepts input with or without the leading ?
  • Updates instantly as you type

Common use cases

  • Auditing UTM tags (utm_source, utm_medium, utm_campaign) on marketing links
  • Debugging filter, sort and pagination parameters sent to an API
  • Converting a query string into a JSON fixture for tests
  • Checking how form submissions are encoded
  • Spotting duplicate or misspelled parameters

Technical details & standards

Parsing uses the browser's URLSearchParams API, which follows the application/x-www-form-urlencoded rules of the WHATWG URL Standard. Percent-encoded sequences such as %20 and %C3%A9 are decoded as UTF-8, and + is decoded as a space. Parameters are kept in their original order, and a key that appears several times keeps all of its values in the JSON output.

For a full URL, paste just the part after the ?, or use the URL Parser, which splits the whole address into protocol, host, path and query.

Convert repeated query parameters to a JSON array

A URL can send a filter more than once. Keep every value when turning the query into JSON for a test fixture.

Example input

?tag=red&tag=blue&search=hello+world
  1. Paste the query string, including the leading question mark.
  2. Check that tag shows up twice in the table and as an array in the JSON output.
  3. Use %2B in the input if the intended value contains a literal plus sign.

Expected result

{"tag":["red","blue"],"search":"hello world"}

Continue with a related task:

Frequently asked questions

What is a query string?

The query string is the part of a URL after the ?, made of key=value pairs separated by &, such as ?page=2&sort=price. Servers and front-end code read it to filter, sort or track a request.

How are repeated parameters handled?

Every value is kept. In the key-value table each occurrence has its own row, and in the JSON output the values are grouped into an array, for example ?tag=a&tag=b becomes "tag": ["a", "b"].

Why does + turn into a space?

In form-encoded query strings, + represents a space. A literal plus sign must be encoded as %2B. This matches how browsers and most server frameworks read query strings.

How do I build a query string instead?

Encode each key and value with the URL Encoder (encodeURIComponent) and join the pairs with &. In JavaScript, new URLSearchParams({ a: "1", b: "x y" }).toString() does this for you.

Is my data safe?

Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.

Does it work offline?

Once the page has loaded, this tool can process input without an internet connection.

More web & network tools

View all