Getting JSON into a spreadsheet
APIs, databases and web apps speak JSON, but most people analyze data in Excel, Google Sheets or Numbers. CSV is the bridge: a plain table that every spreadsheet can open. The hard part is that JSON is hierarchical and CSV is flat, and naive converters either crash on nested data or fill cells with [object Object].
This converter flattens nested objects into columns such as address.city, joins simple lists into a single cell, and builds the header from every key that appears in any record, not just the first one. The CSV follows RFC 4180, so commas, quotes and line breaks inside values are quoted correctly.
JSON vs CSV at a glance
| Feature | JSON | CSV |
|---|---|---|
| Full name | JavaScript Object Notation | Comma-Separated Values |
| Type | Hierarchical data | Tabular data |
| Introduced | Early 2000s (RFC 4627 in 2006) | Early 1970s; described by RFC 4180 in 2005 |
| Created by | Douglas Crockford; now ECMA-404 and RFC 8259 | No single owner |
| Structure | Nested objects and arrays | Flat rows and columns |
| Comments | No | No |
| Data types | String, number, boolean, null, object, array | Text only, no built-in types |
| Best for | APIs, web apps and app settings | Spreadsheet exports and database imports |
| Support | Every programming language | Excel, Google Sheets, databases and every language |
| MIME type | application/json | text/csv |
How to convert JSON to CSV
Step 1: Prepare a .json file
Save your API response or export as a .json file. An array of objects works best.
Step 2: Drop it on the converter
The file is parsed in your browser; invalid JSON is reported instead of silently skipped.
Step 3: Convert to CSV
Records are flattened, columns are collected and the table is written with standard quoting.
Step 4: Open in your spreadsheet
Download the .csv and open it in Excel, Google Sheets or LibreOffice.
How JSON is mapped to rows and columns
Nested objects flattened
{"user": {"name": "Ana"}} becomes a user.name column.
All keys included
Records with extra fields add columns instead of losing data.
Wrapped arrays detected
Responses like {"data": [...]} use the inner array as the rows.
Lists handled
Arrays of simple values are joined with commas; arrays of objects are kept as JSON text.
Common JSON to CSV tasks
Analyzing API data. Pull records from a REST API and pivot them in a spreadsheet.
Sharing with non-developers. Give colleagues a file they can open with a double click.
Importing into other tools. CRMs, email platforms and databases usually import CSV.
Quick data checks. Scan hundreds of records in a grid instead of scrolling JSON.
How different JSON shapes are handled
An array of objects gives one row per object, which is the ideal input. If the top level is an object that contains exactly one array of objects, as many APIs return with a data or results property, that array is used as the rows and the surrounding metadata is ignored. Any other object becomes a single row, and an array of plain values becomes a one-column table named value.
Null values become empty cells. Booleans and numbers are written as text, which spreadsheets recognize automatically when you open the file.
- [ {...}, {...} ]: one row per object.
- { "data": [ {...} ] }: rows from the data array.
- { "a": 1, "b": 2 }: a single row.
Opening the CSV in Excel
The file is saved as UTF-8. Current versions of Excel usually detect this, but if accented characters look wrong, import it through Data, From Text/CSV and choose UTF-8 as the file origin.
Excel may also reformat values that look like dates or long numbers, such as order IDs. Importing with the From Text/CSV wizard lets you set those columns to Text, or you can use the CSV to XLSX converter to create a workbook where IDs with leading zeros stay as text.
Tips for clean CSV output
- Validate large JSON files in a code editor first; one missing comma stops the whole conversion.
- Deeply nested arrays of objects are better flattened in code before exporting.
- Rename dotted columns in the spreadsheet if you need friendlier headers.
- Going the other way later? The CSV to JSON converter reads the same format back.
JSON to CSV questions
How are nested objects handled?
They are flattened into columns with dot notation, for example address.city and address.zip.
What if records have different fields?
Every key from every record becomes a column. Records without a value for a column get an empty cell.
What happens to arrays inside records?
Arrays of simple values are joined into one cell with commas. Arrays of objects are stored as JSON text in the cell.
Is there a size limit?
No fixed limit. Files of several megabytes convert quickly; very large files depend on your device's memory.
Which delimiter does the CSV use?
A comma, with double quotes around values that contain commas, quotes or line breaks.
Is my data uploaded?
No. Parsing and conversion happen entirely in your browser.