JSON to CSV Converter

Runs locally

Turn a JSON array into a spreadsheet — nested objects become dot-notation columns.

JSON

CSV

2 rows × 7 columns

id,customer.name,customer.city,items,total,paid,coupon
1001,Ada Lovelace,London,"[""keyboard"",""mouse""]",113.5,true,
1002,Linus Pauling,Portland,"[""monitor""]",249,false,SPRING10
 
Guide

CSV is flat, so nested JSON has to be flattened

CSV (RFC 4180) is a table: a header row, then one line per record, with fields separated by a delimiter and quoted when they contain the delimiter, a quote or a line break. JSON has no such limit — objects nest and arrays hold any number of values — so converting means deciding how each nested value becomes a column. This converter walks every record, turns nested object keys into dot-notation names (customer.name, customer.address.city) and collects every key it sees, in first-seen order, as the header. A record missing a key gets an empty cell rather than shifting the columns.

Arrays have no single right answer, so there are three modes. Keep as JSON writes ["en","fr"] into one cell, which round-trips exactly. Join writes en; fr, which reads well in a spreadsheet but loses the difference between a string and a list. One column per index spreads the items over langs[0], langs[1] and so on, which suits short fixed-length arrays such as coordinates. To see the dot-notation keys a record produces before choosing, flatten one record first.

Excel on Windows guesses the text encoding of a CSV it opens, and guesses wrong for UTF-8 without a byte-order mark — é turns into é. Tick Add BOM for Excel and the downloaded file starts with U+FEFF, which Excel reads as a UTF-8 marker; Google Sheets and Numbers do not need it. Europe-based spreadsheets that use a comma as the decimal separator expect a semicolon as the delimiter, which the delimiter option provides.

JSON array

[
  { "id": 1, "user": { "name": "Ada", "langs": ["en", "fr"] } },
  { "id": 2, "user": { "name": "Bo" } }
]

CSV (arrays kept as JSON)

id,user.name,user.langs
1,Ada,"[""en"",""fr""]"
2,Bo,

The inner quotes are doubled, as RFC 4180 requires. With arrays set to Join, the first row becomes 1,Ada,en; fr.

Where people get caught

Excel mangles accented characters

Download with Add BOM for Excel ticked, or import the file through Data → From Text/CSV and choose UTF-8.

Leading zeros and long numbers disappear in a spreadsheet

The CSV keeps 02134 and 12345678901234567890 exactly; Excel converts them to numbers when it opens the file. Import the column as Text to keep them.

Records with different keys

Every key from every record becomes a column, so one unusual record can add a mostly empty column. Check the header in the table preview before sharing the file.

A single object instead of an array

A top-level object becomes one row. If your records sit under a key such as data or items, convert that array rather than the whole response.

About JSON to CSV conversion

How it works in 4 steps · 4 common use cases · 4 questions answered

How it works

  1. 1.Paste or drop a JSON array; the CSV updates as you type.
  2. 2.Pick the delimiter and how arrays and nested objects are written.
  3. 3.Check the Table tab to see the columns a spreadsheet will get.
  4. 4.Copy the CSV or download it as a .csv file.

Common use cases

  • •Opening an API response in Excel or Google Sheets
  • •Handing query results to someone who does not read JSON
  • •Preparing a CSV import for a CRM or a database
  • •Flattening event logs for a quick pivot table

FAQ

How are nested objects converted?

Each nested key becomes a dot-notation column, so {"user":{"name":"Ada"}} gives a user.name column. Turn off Flatten nested objects to keep each nested object as a JSON string in one cell.

What happens to arrays?

By default an array is written as JSON in one cell. You can join simple values with "; " or spread them over indexed columns such as tags[0] and tags[1].

Why does Excel show strange characters?

Excel assumes a legacy encoding for CSV files without a byte-order mark. Tick Add BOM for Excel before downloading, and accented letters and emoji open correctly.

Which delimiter should I use?

Comma for most tools; semicolon for spreadsheets set to a European locale, where the comma is the decimal separator; tab when values themselves contain commas and semicolons.