About the JSON to CSV
Convert an array of JSON objects into CSV for Excel or Google Sheets. Nested fields are flattened into columns like address.city, and values are quoted correctly.
Key features
- Flattens nested objects into dot-notation columns
- Collects every key across all rows as columns
- RFC 4180 quoting for commas, quotes and line breaks
- Comma, semicolon or pipe delimiters
- Arrays of values joined into a single cell
- Download a .csv that opens in Excel and Google Sheets
Convert JSON to CSV for spreadsheets
CSV (comma-separated values) is the universal format for tabular data. Excel, Google Sheets, Numbers, databases, BI tools and data-science libraries all read it. Converting JSON to CSV is the fastest way to get API data, exports or logs into a spreadsheet where anyone can sort, filter and chart it.
Example
[
{ "id": 1, "name": "Ada", "address": { "city": "London" }, "tags": ["admin", "dev"] },
{ "id": 2, "name": "Alan", "address": { "city": "Wilmslow" }, "tags": [] }
]
id,name,address.city,tags
1,Ada,London,"admin, dev"
2,Alan,Wilmslow,
How the conversion works
- Rows. An array becomes one row per element. A single object becomes one row.
- Columns. Every key found in any row becomes a column, in order of first appearance.
- Flattening. Nested objects become
parent.childcolumns; arrays of objects becomeitems[0].field. - Simple arrays. Lists of strings or numbers are joined with commas into one cell.
- Quoting. Cells containing the delimiter, double quotes or line breaks are quoted per RFC 4180.
Choosing a delimiter
| Delimiter | Use when |
|---|---|
Comma , | Default; US/UK Excel, Google Sheets, most tools |
Semicolon ; | Excel in locales that use a comma as the decimal separator (DE, FR, IT, ES, NL…) |
Pipe | | Data with lots of commas and semicolons in the text |
Tips for clean spreadsheets
- Remove empty fields first with the JSON Cleaner to avoid blank columns.
- Leading zeros. Excel removes leading zeros from values like ZIP codes. Import via Data → From Text/CSV and set the column type to Text.
- Very wide data. If flattening creates too many columns, consider extracting just the fields you need with the JSONPath Tester first.
- Need a real .xlsx file? Use JSON to Excel.
Related tools
For tab-separated output that pastes directly into spreadsheets, use JSON to TSV. To go from a spreadsheet back to JSON, use Excel to JSON, which also reads CSV files.
How to use the JSON to CSV
- Paste your data into the input box, upload a file, or click Sample to try it out.
- Adjust the options above the editor if you need to (indentation, delimiter, and so on).
- The CSV appears instantly in the output panel. Any errors are shown with their line and column.
- Click Copy to copy the result, or Download to save it as a file.