JSON to CSV Converter

Turn a JSON array of records into CSV

Input (JSON)

Output (CSV)

JSON to CSV Converter guide

A JSON API response is hard to scan, but the same data in a spreadsheet is easy to sort and filter. This converter turns a JSON array of objects into CSV you can open in Excel, Numbers, or Google Sheets.

What the input needs

  • An array. The top level must be a list, such as [{...}, {...}]. A single object cannot become rows.
  • Matching keys. The columns come from the keys of the first object. Keys that appear only in later objects are left out, so give every object the same keys.
  • Flat values. Nested objects and arrays are written into one cell as JSON text.

Example

[{ "name": "Ann", "age": 31 }, { "name": "Raj", "age": 27 }]

// converts to

name,age
Ann,31
Raj,27

Frequently asked questions

Why does it say "CSV needs a list of records"?
CSV is a list of rows, so the input must be a JSON array. If your records are inside a field, such as { "users": [...] }, paste just the array. For a single object, wrap it in [ ] to get one row.
Why is a column missing?
Columns are taken from the first object. Add the missing key to the first object, even with an empty value, and it will appear.
How do I open the result in Excel?
Copy the output, save it as a .csv file, and open that file, or paste it into Google Sheets and split the text into columns.