Query String to JSON Converter
Convert a URL query string to a JSON object and back, in your browser.
How to use
- Choose the direction: query string to JSON, or JSON to query string.
- Paste your query string (with or without the leading ?) or JSON object.
- Copy the converted result from the output box.
About this tool
ShowHide
Paste a query string — or a whole URL — and get a clean JSON object, with values percent-decoded and repeated keys collected into arrays. Switch direction to turn a JSON object back into an encoded query string. Parsing uses the browser's own URLSearchParams, so it behaves exactly as a server's URL layer will: a plus sign decodes to a space, and on the way back out spaces are encoded as plus signs again. One expectation to set: bracket syntax is not interpreted. A key written as items[] stays literally items[], and items[0][name] stays one long key, because the nesting conventions used by PHP, Rails and qs are framework habits rather than part of the URL standard. Everything runs locally — nothing is uploaded.
Frequently asked questions
How are repeated keys handled?
When the same key appears more than once (for example tags=a&tags=b), it becomes a JSON array. A key that appears once stays a plain string.
Can I paste a full URL?
Yes. Everything up to and including the ? is ignored and any #fragment is dropped, so you can paste a complete URL and still get just the query parameters.
How are nested objects converted to a query string?
Arrays are expanded into repeated keys. A nested object or array of objects is serialized to JSON and percent-encoded as the value, since query strings are flat key-value pairs.
Is my data sent anywhere?
No. The conversion happens entirely in your browser; nothing is uploaded.
Why is my key still called items[] instead of becoming an array?
Because bracket syntax is a framework convention, not part of the URL standard. PHP, Rails and the qs library each read items[] or user[name] as structure; a plain URL parser sees one literal key. Repeat the same key instead — items=1&items=2 — and it becomes an array here and almost everywhere.
Should a space be %20 or a plus sign?
Both decode to a space in a query string, which is why this accepts either and emits the plus form. In a path segment they are not interchangeable: %20 is a space and a plus sign is a literal plus. That difference is a common source of filenames that arrive with a stray plus in the middle.
Related tools
URL Query Builder
Build URLs by combining a base address with editable key-value query parameters — each pair toggleable, properly percent-encoded.
Network
URL Parser
Break a URL into protocol, host, port, path, query, and hash. Decode query parameters into a table.
Developer
String Escape Converter
Escape a string for 10 contexts at once — JavaScript, JSON, HTML entities, URL, SQL, regex, Bash (single/double quote), C string, Unicode \u escapes.
Developer
JSONPath Tester
Run JSONPath queries ($.store.book[*].author, $..price) against a sample document and see the matching values.
Developer
Unicode Escape Converter
Encode text to \uXXXX, U+XXXX or HTML entities — and decode any of those back to text. Handles emoji and astral characters.
Developer
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text, instantly.
Developer