How to convert JSON to CSV

You have JSON — an API response, an export, a config — and you need it in a spreadsheet. This guide shows what JSON shape converts cleanly to CSV, how nested data is handled, and how to convert in your browser without sending the data anywhere.

The fastest way

Paste your JSON into JSON to CSV, and it produces spreadsheet-ready CSV to copy or download. Read on for how to get the cleanest table.

The structure that converts cleanly

CSV is a flat grid, so the ideal input is an array of flat objects: each object is a row, each key a column.

[
  { "name": "Ann", "age": 30, "city": "Oslo" },
  { "name": "Bo",  "age": 25, "city": "Lima" }
]

Keep the keys consistent across objects for a tidy table; where a key is missing, that cell is simply left empty.

Nested data

Because CSV cannot nest, nested objects and arrays must be flattened (a user.name column) or kept as a JSON string inside a cell. If your data is deeply nested, tidy and flatten it first — paste it into the JSON Formatter to inspect and restructure before converting.

Opening it in a spreadsheet

CSV opens directly in Excel, Google Sheets, and Numbers. Going the other way — a spreadsheet export back into JSON for code — is just as easy with CSV to JSON.

A note on privacy

Datasets often contain customer or internal data. JSON to CSV parses and converts entirely in your browser, so nothing you paste is ever uploaded to a server.

Open the JSON to CSV tool →

Common questions

What JSON structure converts cleanly to CSV?

An array of flat objects, where each object becomes a row and its keys become the columns — for example [{"name":"Ann","age":30},{"name":"Bo","age":25}]. Every object should share the same keys for a tidy table; missing keys become empty cells.

How are nested objects and arrays handled?

CSV is flat, so nested values have to be flattened or serialized. A common approach is to flatten nested keys (user.name becomes a column) or to keep the nested value as a JSON string in the cell. If your data is deeply nested, flatten it in the JSON first for the cleanest spreadsheet.

Will the CSV open in Excel and Google Sheets?

Yes. CSV is the universal spreadsheet exchange format — open it directly in Excel, Google Sheets, or Numbers. If you need a native Excel file, convert the JSON to CSV first, then open and save as .xlsx.

Is my data uploaded when I convert it?

No. The JSON is parsed and the CSV is generated entirely in your browser, so customer records, exports, and internal datasets never leave your device.