Skip to content
codinganthem
All tools/Converters/JSON to CSV

JSON to CSV

Convert a JSON array to CSV format instantly online, for free. Ready to open in Excel or Google Sheets — great for exporting API data.

More
Buy me a coffee

How the conversion works

Paste a JSON array of objects. Every key found in any object becomes a column, and each object becomes a row. An object that lacks a key gets an empty cell in that column, and null becomes an empty cell too. The result opens directly in Excel, Google Sheets or Numbers.

[
  {"id": 1, "name": "Ada", "city": "London"},
  {"id": 2, "name": "Linus"}
]

id,name,city
1,Ada,London
2,Linus,

Nested objects and arrays

CSV is flat, so a nested object or array is written into a single cell as JSON text, for example {"lat":51.5,"lng":-0.1}. If you need separate columns, flatten the data first (for example address.city), or use the spreadsheet's text-to-columns feature afterwards.

Quoting rules

Values that contain a comma, a double quote or a line break are wrapped in double quotes, and any double quote inside is doubled (" becomes ""), following the usual CSV convention (RFC 4180). That keeps addresses, descriptions and multi-line notes in one cell.

Opening the file in Excel

  • Long numbers such as phone numbers or IDs may be shown in scientific notation or lose leading zeros. Import the column as Text to keep them as they are.
  • If accented characters look wrong, import the file using Data > From Text/CSV and choose UTF-8.
  • Some regional Excel settings expect semicolons instead of commas; the import dialog lets you pick the delimiter.

Going the other way

To turn a spreadsheet export back into JSON, use CSV to JSON. To check the shape of large JSON before converting, use JSON Statistics.

Frequently asked questions

What JSON can be converted to CSV?+

An array of plain objects, such as an API response listing records. A single object or an array of arrays isn't accepted, because there'd be no consistent columns.

What happens to nested objects?+

They're written into one cell as JSON text, because CSV has no nesting. Flatten the data first if you need separate columns.

What if objects have different keys?+

Every key found in any object becomes a column. Rows without that key get an empty cell.

Why does Excel change my numbers?+

Excel guesses column types and may drop leading zeros or show long numbers in scientific notation. Import those columns as Text.