JSON to CSV

Convert JSON to CSV with automatic header detection.

About JSON to CSV

Turns a JSON array of objects into CSV. The header row is built from the union of all keys found in the objects, so records with different fields still line up in the right columns.

When you would use it

How to use it

  1. Paste a JSON array of objects, for example [{"name":"Ann","age":30},{"name":"Bob"}]. JSON5 syntax is accepted.
  2. Read the CSV on the right: the first line holds the headers, one line per object follows.
  3. Copy the result and save it as a .csv file.

Things worth knowing

Frequently asked questions

Why does a column show [object Object]?
That field holds a nested object. CSV is flat, so flatten nested data into separate keys such as address_city before converting.
Excel shows everything in one column, what is wrong?
Some Excel locales expect a semicolon separator. Use the Data > From Text/CSV import and choose comma as the delimiter, or open the file in Google Sheets.

All the tools