JSON to CSV
Flatten a JSON array into a CSV table, handling nested objects and records with different shapes.
Processed on your device — no upload
Nested objects become dotted columns — address.city. Arrays of plain values are joined with a semicolon; arrays of objects get numbered columns. Records with different shapes are merged into one table, with blanks where a field was missing.
How to use it
- Paste your JSON array, or choose a file.
- Pick a delimiter — semicolon if the file is for European Excel.
- Copy or download the CSV.
How it works
JSON is a tree and CSV is a grid, so the conversion has to answer two questions the format cannot: what to do with nesting, and what to do when records have different shapes.
Nesting becomes dotted column names. { address: { city: "Amman" } } becomes a column called address.city. Arrays of plain values are joined with a semicolon; arrays of objects get numbered columns like items.0.sku. Every leaf ends up somewhere, rather than a nested object being written as [object Object].
Different shapes are merged into one table. The columns are the union of every key across every record, kept in first-seen order, and a record missing a field gets a blank rather than shifting the row. This is the case that breaks most converters, which take their columns from the first object and quietly drop everything the later ones added.
Output quoting follows RFC 4180: a field is quoted only when it contains the delimiter, a quote, a newline or edge whitespace. That keeps the file readable while surviving a round trip back through a parser.
A worked example
An API returns orders and you need them in a spreadsheet. Press Load sample JSON to see the two hard cases together.
The first record has address.city and address.zone; the second has only address.city. The first has two tags; the second has none. The second has a note field the first does not.
The result is a single table with columns id, name, address.city, address.zone, tags, note. The second row has a blank where address.zone would be and a value under note where the first row is blank. Nothing was dropped, and no row is misaligned.
One setting to get right before opening in Excel. If your Excel is configured for a European locale it expects semicolons, not commas — open a comma-separated file there and every row lands in a single column. Switch the delimiter to semicolon and it opens correctly.
The other half of that problem is encoding: Excel needs a byte-order mark to read UTF-8, and without one Arabic and accented text opens as mojibake. Going straight to an .xlsx file avoids both issues entirely, since the format carries its own encoding.
Questions
Is my JSON uploaded?
No. The conversion runs in your browser, so API responses containing customer data stay on your device.
What happens to nested objects?
They become dotted column names — address.city rather than a column containing [object Object]. Every leaf value gets its own column.
What if my records have different fields?
The columns are the union of every key across every record, so nothing is lost. Records missing a field get a blank rather than a shifted row.
How are arrays handled?
Arrays of plain values are joined with a semicolon into one cell. Arrays of objects get numbered columns such as items.0.sku.
Why does my CSV open in one column in Excel?
Because a European Excel expects semicolons. Switch the delimiter to semicolon, or export to .xlsx instead, which has no delimiter at all.
Why does Arabic look like nonsense when I open the CSV?
Excel needs a byte-order mark to recognise UTF-8. Use the CSV to Excel tool instead — the .xlsx format carries its encoding internally.
Can I convert a single object rather than an array?
Yes. A single object is treated as a one-row table.
What if my JSON is invalid?
You get the parser message rather than a partial file. Run it through the JSON formatter first, which reports the line and column of the error.
Does this give me a JSON to CSV file I can open in Excel?
It gives you CSV text and a download. Excel opens that, though it guesses the delimiter by locale — if your columns arrive merged into one, pick the semicolon option, which is what a European Excel expects.