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.