Skip to main content
Back to tools

JSON to CSV

Convert a JSON array of objects to CSV format

About JSON to CSV

Converts a JSON array of objects into comma-separated text, with a header row built from every key found across the objects, so records with different fields still line up under the right columns. Nested objects and arrays are kept as JSON text inside their cell. Useful for opening API responses in a spreadsheet or feeding data to tools that only accept CSV.

Category: Converters.

Frequently asked questions

What JSON structure works for CSV conversion?

▾

A top-level array of objects. Each object becomes a row, and the columns are every key found across all objects in first-seen order, with an empty cell wherever an object lacks a key. Anything else at the top level, such as a single object, is rejected with an error.

Are nested objects flattened into columns?

▾

No. Nested objects and arrays are written into a single cell as JSON text, for example {"city":"NY"}, quoted and with the inner quotes doubled. Flatten them beforehand, for instance into an address_city key, if you need separate columns.

Which delimiter and quoting rules does the output use?

▾

Columns are always separated by commas and rows by line feeds. A value containing a comma, double quote or line break is wrapped in double quotes with any inner quotes doubled, while null values become empty cells.

Can I download the CSV file?

▾

Yes. Besides copying the result, you can download it as export.csv; the file is generated in your browser, so nothing is uploaded.

Related tools