JSON to Query String Convert
Convert a JSON object into a URL query string, and back again.
JSON to Query String is a free online tool that convert a JSON object into a URL query string, and back again. It runs entirely in your web browser using plain JavaScript, so files are processed on your own device and never uploaded to a server. There is no sign-up, no file size limit imposed by the site, no watermark and no paid tier.
- Price
- Free: no account, no quota, no watermark
- Category
- Convert
- Where it runs
- In your browser, on your device
- Files uploaded
- None
- Technology
- plain JavaScript
- Settings
- 2
- Works offline
- Yes, after the first visit
About JSON to Query String
Encoding is done with URLSearchParams, the browser's own implementation of the URL standard, so the escaping matches exactly what fetch and every server-side parser expect. Two conventions are worth knowing before you rely on the output. An array becomes a repeated key (tags=a&tags=b) rather than the tags[]=a form PHP and Rails prefer, and a nested object is JSON-encoded into its value, because a query string is flat and has no way to express depth. Decoding reverses both, with one asymmetry that is unavoidable: a repeated key collapses back into an array, so a single-item array does not survive the round trip and returns as a plain string.
How to use it
- Paste the text you want to run through json to query string.
- Set direction and include leading ?.
The 2 settings
| Setting | What it does | Default |
|---|---|---|
| Direction | Choose from 2: JSON → query string, Query string → JSON. | JSON → query string |
| Include leading ? | On or off. On by default. | On |
Under the hood
| Runs on | plain JavaScript: runs the whole thing |
| Controls | Direction, Include leading ? |