How to Convert JSON to CSV

CSV is the language of spreadsheets, and JSON is the language of APIs. Converting between them is a daily task. Here's how it works.

The basic mapping

A JSON array of objects maps cleanly to CSV: each object becomes a row, and each key becomes a column.

[
  { "name": "Alice", "age": 30 },
  { "name": "Bob", "age": 25 }
]

becomes

name,age
Alice,30
Bob,25

Handling tricky values

  • Commas inside values — the field is wrapped in double quotes: "Smith, John".
  • Quotes inside values — doubled: "She said ""hi""".
  • Missing keys — become empty cells.

A good converter handles all of this for you.

Nested objects and arrays

CSV is flat, so nested JSON needs flattening (e.g. address.city) or serializing. See how to flatten nested JSON for CSV.

Convert online

Paste your JSON array into the JSON to CSV converter and copy the CSV — ready to open in Excel, Google Sheets, or Numbers. It runs in your browser.

Going the other way

Need to import a spreadsheet into your app? See how to convert CSV to JSON.

Got a config file to check?

Open the config toolkit →