JSON to CSV examples
Common JSON shapes and the CSV they produce, including nested data and custom delimiters.
Array of objects
The most common shape is an array of flat objects. Each object becomes one row, and each unique key across the array becomes a column header.
Nested values
When a value is itself an object or array, it is written into the cell as JSON text. This keeps the CSV rectangular while preserving the original data.
Choosing a delimiter
Comma is the default. If your values contain commas, a tab or semicolon delimiter can make the file easier to read in some spreadsheet apps.