devtools

Query String Parser & Builder

Parse a URL query string into readable JSON, or build an encoded query string from a JSON object. Repeated keys become arrays. Private, in your browser.

Runs entirely in your browser — your data never leaves your device.

How to use Query String Parser & Builder

What it does & when you need it

A query string is the part of a URL after the ?, and it packs a list of key–value pairs into one flat, percent-encoded line. This tool reads that line and turns it into indented JSON you can actually scan, then lets you go the other way and build a valid query string from a JSON object. Everything happens in your browser, so a link carrying an auth token or a customer ID never leaves your machine.

Reach for it when you are debugging a tracking link, an OAuth redirect, an API request, or a webhook payload and need to see exactly which parameters are set — or when you are assembling a URL by hand and want the encoding done correctly.

How to use

  1. In Parse mode, paste a full URL or a bare query string into the input. The output pane shows the parameters as JSON, with values decoded.
  2. Switch to Build mode and paste a JSON object; the output becomes an encoded query string ready to append after a ?.
  3. Press Sample for a worked example, or copy the result with Copy or Ctrl/Cmd + Enter.

Things worth knowing

Repeated keys become an array. ?tag=a&tag=b parses to {"tag": ["a", "b"]}. Servers disagree on whether the first or last value of a duplicated key wins, so seeing both is frequently how you find the bug. In Build mode, an array value expands back into repeated keys.

Encoding is handled both ways. Parsing decodes %20 and a literal + to spaces; building re-encodes spaces and reserved characters for you. A URL with no query returns an empty object rather than an error.

Build expects an object. Feed it {"page": 2}, not an array or a loose value. Invalid JSON returns a clear message. To inspect a whole URL instead, use the URL parser; to escape a single value, use the URL encoder.

Examples

Parse a search URL with repeated keys

https://shop.example.com/search?q=winter+coat&tag=sale&tag=new&page=2

The two tag values become an array and the + in q decodes to a space in the JSON output.

Encoded value

?redirect=%2Fdashboard%3Ftab%3Dbilling&ok=true

Percent-encoded characters are decoded, so redirect reads as /dashboard?tab=billing.

Build from JSON (switch to Build mode)

{
  "q": "winter coat",
  "tag": ["sale", "new"],
  "page": 2
}

In Build mode this JSON becomes q=winter+coat&tag=sale&tag=new&page=2, ready to append to a URL.

Frequently asked questions

How are repeated query parameters like ?tag=a&tag=b handled?

They collapse into an array. Parsing ?tag=a&tag=b returns {"tag": ["a", "b"]}, while a key that appears once stays a plain string. This matters because backends disagree about whether the first or last value of a repeated key wins, and seeing both spelled out is often how you spot the bug.

Can I paste a whole URL, or only the query string?

Either works. The parser looks for the first ? and reads everything after it, dropping any #fragment, so https://example.com/search?q=hi and ?q=hi and a bare q=hi all parse to the same result. A URL with no query returns an empty object rather than an error.

Does it decode percent-encoding and plus signs?

Yes. Values are URL-decoded, so q=hello%20world reads as "hello world", and a + in a value becomes a space because that is how form-encoded query strings represent spaces. When you build a query string the reverse happens: spaces and reserved characters are encoded for you.

How does Build mode turn JSON into a query string?

Give it a JSON object and each key becomes a parameter. Array values expand into repeated keys, so {"tag": ["a", "b"]} becomes tag=a&tag=b, and numbers and booleans are stringified. Invalid JSON, or a top-level array or value instead of an object, returns a clear error.

Is my data sent to a server?

No. Both parsing and building run entirely in your browser with the built-in URLSearchParams API, so a query string containing tokens, IDs, or internal parameters never leaves your machine, and the tool keeps working offline.