Tools
Log in
English

All converters

JSON to CSV

Turn a JSON array into CSV for Excel, or CSV into JSON. Nested keys become a.b.

Settings

To turn JSON into CSV, each object in an array becomes a row and each key becomes a column; nested objects are flattened into names like address.city. Paste or drop your JSON, preview the table, then download a CSV with an optional BOM so Excel shows Korean and other non-English text correctly.

How to do it by hand

  1. Start with an array of objects, like [{"id":1}, {"id":2}].
  2. Collect every key that appears in any object; together they form the header row.
  3. Flatten nested objects with dots, and write arrays as JSON text in a single cell.
  4. Quote cells that contain commas, quotes or line breaks, and double any quotes inside.
  5. Add a BOM if the file will be opened in Excel.

Worked examples

[{"n":"Lee","age":30}]

the keys n and age become the header

n,age then Lee,30

[{"user":{"id":7}}]

the nested key is joined with a dot

user.id then 7

[{"f":"=1+1"}]

the cell starts with =, so a quote mark goes in front

f then '=1+1

Common mistakes

  • Feeding in one object instead of an array. You get a single row; wrap a list of records in [ ].
  • Opening a UTF-8 CSV in Excel without a BOM, which can turn Korean into broken symbols.
  • Letting cells that start with = run as formulas. The converter adds a leading quote mark to stop that.

How JSON values land in CSV cells

JSONCSV
{"user":{"name":"Kim"}}column user.name, value Kim
{"tags":["a","b"]}column tags holds ["a","b"] as text
{"memo":null}empty cell
{"ok":true}true
{"f":"=1+1"}'=1+1 (with formula blocking on)
{"a":"x,y"}wrapped in quotes: "x,y"
{"a":"say \"hi\""}"say ""hi"""

Questions people ask

Can it turn CSV back into JSON?

Yes. Switch to CSV to JSON and the first row is used as the keys.

What happens when objects have different keys?

Every key found in any object gets a column. Rows that lack a key leave that cell empty.

What is the quote mark in front of some cells?

Cells that start with =, +, - or @ could run as formulas in a spreadsheet, so a ' is added in front and the cell shows as plain text.