JSON to CSV
Convert JSON arrays into CSV, flattening nested data.
How to use JSON to CSV
What this tool does
This tool converts a JSON array of objects into CSV — the comma-separated format that spreadsheets, databases, and data pipelines read natively. You paste JSON, pick a delimiter, and get back a clean CSV table with a header row. Because JSON can nest objects and arrays while CSV is strictly flat, the converter flattens nested structures into dot-notation columns so no information is lost. Everything happens inside your browser, so the data never leaves your device.
Why you might need it
JSON is the language of APIs, but CSV is the language of spreadsheets. The moment you need to hand data to a non-developer, load it into Excel or Google Sheets, import it into a database table, or feed it to a tool that only accepts tabular input, you need CSV. Doing that conversion by hand is tedious and error-prone: you have to decide on a column for every field, escape values that contain commas, and keep rows aligned even when objects differ. This tool does all of that correctly and instantly.
How to use it
- Paste a JSON array of objects into the input box, or drop a
.jsonfile onto it. - Choose a delimiter — comma, semicolon, or tab. Semicolon is common in European locales; tab produces TSV.
- Decide whether to include a header row using the checkbox.
- Click Convert to CSV, or press Ctrl/Cmd + Enter.
- Copy the result with one click, or download it as a
.csvfile ready to open in a spreadsheet.
How flattening works
CSV is a flat grid, so nested JSON has to be unfolded. An object nested under a
key becomes a set of dotted columns: {"meta": {"server": false}} produces a
column named meta.server. An array of primitive values — for example
"tags": ["math", "compute"] — is joined into one cell as math; compute. An
array of objects is expanded by index, so "items": [{"id": 1}, {"id": 2}]
becomes the columns items.0.id and items.1.id. The header row is the union
of every column across all rows, which means objects with different shapes still
produce a valid, rectangular table — missing fields simply become empty cells.
Common pitfalls
The biggest surprise is column count. If your objects vary a lot in structure, or contain large arrays of objects, the flattened CSV can have far more columns than you expected — every distinct path becomes its own column. If that happens, consider normalising your JSON before converting, or splitting one large array into several smaller, more uniform ones. Another trap is invalid JSON: keys must use double quotes, there can be no trailing commas, and comments are not allowed. The tool reports a clear error if parsing fails. Finally, remember that every item in the array must be an object — a bare array of strings or numbers has no field names and therefore no columns.
Tips and advanced use
CSV escaping is handled for you: any value containing the delimiter, a double
quote, or a line break is wrapped in double quotes, and internal quotes are
doubled, exactly as the CSV convention requires. That means a name like
Alan, Turing survives the round trip intact. Rows are joined with \r\n, the
line ending most spreadsheet software expects. If you are targeting a European
spreadsheet, pick the semicolon delimiter so Excel splits the columns correctly
without an import wizard. And because the whole conversion is client-side, you
can convert exported analytics, user records, or config dumps without any of it
touching a network.