JSON to Query String
Serialize JSON into URL query strings with bracket or dot nesting — locally and instantly.
JSON input
Query string
No query string yet
Paste an object or load an example to generate parameters.
Examples
Search params
{ "q": "hello world", "page": 2 }q=hello%20world&page=2Reserved characters are encoded so URLs stay unambiguous.
Nested user
{ "user": { "name": "Ann" } }user[name]=AnnBracket notation is understood by PHP and Rails-style parsers.
About this tool
The JSON to Query String converter serializes a JSON object into URL parameters with explicit, framework-aware conventions. Structural brackets and dots stay literal while each key segment and every value is percent-encoded, so the output matches what PHP, Rails, Express or a hand-written backend parser expects.
Choose between bracket nesting (user[name]), dot notation (user.name) and flat mode (nested values as JSON strings). Arrays can be repeated keys, indexed brackets, empty brackets or comma-joined values; nulls can be skipped, emptied or emitted literally. An optional base URL is composed correctly even when it already contains a query string or fragment, and a curl command is generated alongside the parameters.
What this tool does not do
- Digit-only values are emitted as plain numbers; integers beyond 2^53 may already have lost precision in JSON.parse.
- Flat mode collapses nested objects into JSON-string values — the backend must know to parse them.
- There is no reverse mode; decoding a query string back to JSON belongs in a URL parser.
How to use this tool
Paste a JSON object
Enter an object or array (arrays get a configurable root key) or load one of the examples.
Pick conventions
Select the nesting style, array style and null handling that match your backend parser.
Add a base URL
Optionally enter a base URL; existing ? and # characters are handled correctly.
Copy the result
Copy the full URL for a browser, or the curl command for a terminal; warnings flag ambiguous output.
Use cases
Debug a GET request
Turn a JSON config object into parameters for a browser URL or curl.
Test a backend parser
Compare bracket, dot and flat conventions against what your API actually accepts.
Write API docs
Generate exact example URLs from a documented request object.
Nesting and array conventions
| Option | Output |
|---|---|
| Brackets | user[name]=Ann |
| Dots | user.name=Ann |
| Flat | user=%7B%22name%22%3A%22Ann%22%7D |
| Repeated arrays | ids=1&ids=2 |
| Index brackets | ids[0]=1&ids[1]=2 |
| Empty brackets | ids[]=1&ids[]=2 |
| Comma joined | ids=1,2 |
Spaces are %20 by default; switch to + form for application/x-www-form-urlencoded strictness.
Common mistakes
Mistake:Double-encoding structural brackets
Fix:Use this tool rather than encoding a finished key string; segments are encoded and delimiters are preserved.
Mistake:Using comma-joined arrays with values containing commas
Fix:Switch to repeated keys — the tool warns when a value contains a comma.
Mistake:Appending ? to a URL that already has parameters
Fix:Enter the base URL here; existing query strings get & and fragments stay at the end.
Frequently asked questions
What is the difference between a[b]=c and a.b=c?
Both express nesting, but parsers differ: PHP and Rails commonly understand bracket notation (a[b]=c), while many JavaScript frameworks use dot notation (a.b=c). Choose the convention your backend actually parses.
How should arrays be encoded?
There is no universal answer. Repeated keys (ids=1&ids=2) are the safest default; index brackets preserve positions; empty brackets signal an array to PHP-style parsers; comma joining is compact but ambiguous if a value contains a comma.
Why is + sometimes used for spaces?
The application/x-www-form-urlencoded format historically maps spaces to +. By default this tool emits %20, which is correct for URLs; enable + form when a form-encoding parser expects it.
What does encodeURIComponent encode?
It escapes every character that could change URL meaning — spaces, &, =, #, non-ASCII characters and more. This tool applies it to key segments and values while leaving structural brackets and dots intact.
Can I prefix a base URL?
Yes. Enter any base URL and the tool appends parameters with ? or & as appropriate, keeping an existing fragment at the end. It also generates the corresponding curl command.
References & standards
Related tools
Base32 Encoder / Decoder
Encode and decode Base32 (RFC 4648) with hex input mode and Crockford variant. Handles TOTP secrets. Runs in-browser.
Base58 Encoder / Decoder
Convert hex or text to Base58 and back, with Base58Check validation (version byte + checksum). IPFS CIDs too. In-browser.
Base64 Toolbox
Professional Base64 workspace for text, files and images with Base64URL, MIME, Data URI, strict validation, image preview and ready-to-use snippets.
BibTeX to JSON Converter
Parse .bib bibliographies into structured JSON with authors, months, macros and LaTeX cleanup, all in-browser.
C# to VB.NET Converter
Convert a subset of C# — classes, methods, variables, loops — into VB.NET
CSV Data Viewer
Paste CSV and inspect it as a sortable, searchable table with delimiter detection and inline export.