Anyrow
Log InGet Started

Free online tool

Free Online Query String to JSON Converter

Convert URL query strings to JSON online for free. Accepts ?a=1&b=2 or a=1&b=2. Handles repeated keys and bracket array syntax (c[]=x&c[]=y). All values stay as strings. 100% client-side.

01How it works

01

Paste the query string

Paste a URL query string with or without the leading ?. Repeated keys and bracket arrays are handled automatically.

02

Click Convert

Each key-value pair is URL-decoded and assembled into a JSON object. Repeated keys become arrays.

03

Copy or download

Copy the JSON to clipboard or download it as output.json.

FAQ

Frequently asked questions

Does the input need to include the leading '?'?

The tool accepts both formats. If the input starts with ?, the leading ? is stripped before parsing. This means you can paste a full URL query string directly from your browser's address bar and it will work without manual trimming.

How are array values represented in the query string?

Two syntaxes produce JSON arrays. First, bracket syntax: keys ending with [] (like items[]=a&items[]=b) are collected into an array named items. Second, repeated plain keys: a=1&a=2 produces {"a": ["1"}. Both syntaxes can appear in the same query string.

Why are all values strings in the JSON output?

All values are output as JSON strings, even if they look like numbers or booleans. This matches the behaviour of URLSearchParams and most server-side form parsers. Auto-coercion (turning '1' into the number 1) would silently break values like '001' or '1e5'. If you need typed values, process the JSON output programmatically.

What happens if the query string contains malformed percent-encoding?

Each key-value pair is decoded via decodeURIComponent. If a value contains a malformed percent sequence (e.g. %E0%A4 with incomplete UTF-8), that individual value falls back to the raw undecoded string rather than crashing the whole parse. All other pairs are decoded normally.

Other free tools

JSON to CSV ConverterCSV to JSON ConverterJSON Formatter & ValidatorBrowse all tools →

Need AI-powered document extraction?

This tool uses client-side processing. anyrow uses AI to extract structured data from PDFs, images, and scanned documents with 99% accuracy. 150 free extractions/month — no credit card required.

Try anyrow freeSee how it works