Turn a JSON object into a URL query string — repeat, key[], or comma arrays, bracket-nested objects, sorted, skip-empty — and back to JSON, 100% in your browser
- Runs locally
- Category Developer & DevOps
- Best for Formatting, validating, shrinking, or inspecting code-adjacent text.
What this tool does
Build a URL query string from a JSON object, with full control over how arrays and nested objects come out. Paste an object and instantly read a clean `key=value&key=value` string that drops straight behind a `?`. Every key and value is run through `encodeURIComponent`, so spaces become `%20`, a slash becomes `%2F`, an embedded `&` or `=` is escaped, and Unicode like 你好 survives intact — the string never breaks the URL it lands in.
You pick how arrays serialise: `tag=red&tag=blue` (the repeat style most backends read), `tag[]=red&tag[]=blue` (the bracket style the `qs` library uses), or `tag=red,blue` (compact comma form). Nested objects expand into bracket paths, so `{user:{name:"ada"}}` becomes `user[name]=ada` and a deeper object becomes `user[address][city]=oslo`. Toggle a leading `?`, sort the keys for a stable cache-key or signature, and skip empty values to keep the link tidy.
A reverse pane parses any query string straight back into formatted JSON, so you can edit either side and watch the other rebuild — a round trip never silently mangles your data. Bad JSON gets a clear bilingual error, not a blank screen. Nothing is uploaded: the parser, the serialiser and the JSON formatting are plain JavaScript in your tab, which matters when the object carries a token or an internal redirect you would rather not log on someone else's server.
Tool details
- Input
- Text + Structured content
- The page exposes text boxes, numeric controls, file pickers, or structured inputs depending on the tool.
- Output
- Live result + Copy
- The result area focuses on usable output, with copy, download, or preview actions when supported.
- Privacy
- Browser-side processing
- The main tool logic does not call an external API, so inputs normally stay in the current tab.
- Save / share
- Shareable URL state
- Key settings are encoded in the URL so another person can reopen the same setup.
- Performance budget
- Initial JS <= 9 KB
- No WASM budget is declared, keeping the tool quick to open on mobile.
- Best fit
- Developer & DevOps · Developer
- Category and role tags drive related tools, internal links, and quick fit checks.
How to use
-
1. Input
Paste or drop your content into the tool panel.
-
2. Process
Click the button. All processing is local in your browser.
-
3. Copy / Download
Copy the result or download to disk in one click.
How JSON to Query String Converter fits into your work
Use it in the small gaps between coding, reviewing, debugging, and shipping.
Developer jobs
- Formatting, validating, shrinking, or inspecting code-adjacent text.
- Preparing snippets for documentation, tickets, commits, or handoff.
- Checking a small payload quickly without switching tools.
Developer checks
- Run irreversible transforms like minify or obfuscate on a copy.
- Keep secrets out of pasted snippets unless the tool explicitly stays local.
- Use your normal tests or linter before shipping transformed code.
Good next steps
These links move the current task into a more complete workflow.
- 1 Query String to JSON Converter Parse a URL query string into JSON and rebuild a query string from JSON — two-way, live, with array + nested object conventions — 100% in your browser Open
- 2 URL Encoder / Decoder Encode and decode URL-unsafe characters — query strings, path segments, full URLs — instant, browser-only Open
- 3 URL Query Params Extractor Extract, deduplicate, inspect, copy, and export query parameters from one URL or many URLs locally. Open
Real-world use cases
Build a request URL from a config object you already have
Your code holds a search config as a plain object — `{q:"opus 4", tags:["ai","tools"], page:{size:20}}` — and you need the URL to test it by hand in the browser or in curl. Paste the object, pick the repeat array style, flip on the leading `?`, and you get `?q=opus%204&tags=ai&tags=tools&page[size]=20` ready to append to the endpoint. No counting ampersands, no forgetting to escape the space in "opus 4".
Match the exact array convention a backend expects
A Rails API wants `tags[]=a&tags[]=b`, a Go service wants `tags=a&tags=b`, and a search API wants `tags=a,b`. Same JSON, three targets. Switch the array format and copy the string that fits the service you are calling, instead of hand-editing brackets and getting it subtly wrong. The live preview shows the result before you paste it into your HTTP client.
Produce a stable, signable query string
When you sign a request or use a URL as a cache key, two objects that are logically equal must produce byte-identical strings. Turn on sort and skip-empty: keys come out in lexicographic order and empty values are dropped, so `{b:"",a:"1",c:"2"}` and `{c:"2",a:"1"}` both serialise to `a=1&c=2`. Feed that to your HMAC and the signature is reproducible.
Clean up an object before putting it in a link
You are building a share link from form state that has half-filled fields — empty strings, a null, an empty array. Turn on skip-empty and those vanish from the output, so the link carries only the parameters that actually matter instead of a trail of `&ref=&promo=` noise that clutters the URL and your analytics.
Common pitfalls
Reaching for URLSearchParams with a nested object. `new URLSearchParams({user:{name:'ada'}})` stringifies the object to `[object Object]` rather than nesting it. If your data has any depth, you need bracket-path serialisation, which is exactly what this tool does — copy its output instead of fighting the built-in.
Choosing the comma array style when you need a round trip. `comma` is compact but lossy: `tags=a,b,c` can't be told apart from a single value that happens to contain commas, so parsing it back can't reliably rebuild the array. If you will ever read the string back into JSON, use repeat or bracket.
Assuming the result preserves number and boolean types. A query string is text — `{n:42,ok:true}` serialises to `n=42&ok=true`, and when you parse it back you get the strings "42" and "true", not the original types. Cast them on the receiving end; the tool never guesses types, because guessing can corrupt leading zeros and big integers.
Privacy
Serialising, parsing, and JSON formatting are all plain JavaScript that runs inside your browser tab. No JSON object, no query string, and no record of what you converted is ever sent to a server. Your option choices (array format, sort, leading question mark, skip-empty) are saved only in this browser's localStorage. The one caveat: for the "share link" feature, your JSON input is encoded into the page URL, so if you paste that link somewhere the destination's access log will see it. For an object that carries a token, session id, or signed redirect, copy the text directly rather than sharing the URL.
FAQ
Tool combos
Folks in your role tend to reach for these alongside this tool.
- 555 Timer Calculator Astable f = 1.44/((R1+2R2)C) + monostable t = 1.1RC — pick R1, R2, C in Ω/kΩ and µF/nF, read frequency, duty cycle and pulse width — browser-only
- Add Line Numbers Number every line of pasted text — set start, step and separator, zero-pad to align, skip blanks, or strip numbers back off — browser-only
- AES Text Encryptor Encrypt & decrypt text with a password — AES-256-GCM + PBKDF2 via WebCrypto — 100% in your browser, nothing uploaded
- Affine Cipher Encoder & Decoder Encrypt and decrypt the ax+b affine cipher with live modular-inverse check, browser-only