How to convert JSON to CSV and open it in Excel
See how JSON turns into rows and columns, what to do with nested data, and how to avoid single-column files and garbled characters in Excel.
You pulled orders out of an online store, downloaded a report from an API, or got a .json file from the dev team — and now you need to analyze it in Excel. Open the file and all you see is a wall of braces and brackets: no columns, no filters, no pivot tables.
The fix is converting the JSON to CSV, the plain-text format every spreadsheet opens. Most of the time it takes less than a minute; the effort goes into the details, like arrays inside records and the delimiter Excel expects. To try it with your own data, open the JSON to CSV converter.
Why can't Excel just open JSON?
Spreadsheets think in tables: a fixed grid of rows and columns. JSON is a tree — an object can hold another object, arrays can have any length, and some fields exist only in some records. To become a spreadsheet, that tree has to be flattened. CSV is the simplest middle ground: each line in the file is a row, and a delimiter splits the columns.
Excel can import JSON through Power Query (Data > Get Data > From File > From JSON), but you have to expand columns by hand at every level. For a one-off file, converting to CSV is faster, and the result works the same in Google Sheets, Numbers and LibreOffice.
How JSON becomes rows and columns
The core rule: each object in an array becomes a row, and each property becomes a column. The column set is the union of every key found; if a record lacks a field, that cell is left empty.
address.city column; the array stays as text in its cell; missing fields stay empty.Three JSON shapes show up again and again:
- An array of objects (
[{…}, {…}]): the ideal case — each item becomes a row. - An object that wraps the array (
{"total": 2, "orders": [ … ]}): very common in APIs. The converter finds the first array of objects and tells you which path it used, such asorders. - A single object: becomes a one-row table.
What happens to nested objects and arrays?
Nested objects are flattened with dot notation: {"address": {"city": "Denver"}} becomes the column address.city. Arrays inside a record, like "tags": ["vip", "wholesale"], have no fixed number of columns, so they're written as JSON text in the cell. Nothing gets lost.
If you need one row per array item — say, one row per product in each order — reshape the JSON first so the items are the main list. Alternatively, import the JSON through Excel's Power Query, which shows the array as an expandable column; the “Expand to New Rows” command creates one row per item and repeats the record's other fields.
Comma or semicolon: which delimiter should you use?
Use a comma for Excel on a computer with US or UK regional settings, Google Sheets, databases and most software. Use a semicolon when the file will be opened in Excel on a computer set to a region that writes decimals with a comma — Germany, France, Spain, Brazil and much of Europe and Latin America. What decides it isn't Excel's language but the list separator in the operating system's regional settings; where the comma is taken by numbers like 19,90, that separator is usually a semicolon.
| Where the file is going | Recommended delimiter |
|---|---|
| Excel (US or UK settings) | Comma (,) |
| Excel with comma-decimal settings (most of Europe, Latin America) | Semicolon (;) |
| Google Sheets | Comma (it detects both on import) |
| Databases and other software | Comma, unless told otherwise |
When a value contains the delimiter, a quote or a line break, it's wrapped in double quotes, as RFC 4180 requires. An address like 12 Main St, Apt 4 stays in a single cell.
How to keep special characters intact in Excel
When “Zoë” or “café” shows up as “Zoë” or “café”, it's an encoding problem. The CSV is saved as UTF-8, but Excel on Windows, without a hint, reads it in the system's legacy encoding. The fix is a BOM (byte order mark): three invisible bytes at the start of the file that say “this is UTF-8”. The file you download from the converter already includes one.
If a CSV from another source has no BOM, import it via Data > From Text/CSV and pick “65001: Unicode (UTF-8)” as the file origin.
Watch out for long numbers
Barcodes, order numbers and system-generated IDs often have many digits, and two limits apply to them. JSON.parse, which browsers and the converter use, only represents integers exactly up to 9,007,199,254,740,991; beyond that, the last digits can change as soon as the file is read. Then Excel keeps at most 15 significant digits: a 16-digit code opened as a number has its last digit replaced with a zero.
The way out is to keep those identifiers in quotes in the JSON, as strings, and import the column as Text in Excel. If the JSON comes from your own API, it's worth changing the source so long IDs are always sent as strings.
Step by step with the converter
The JSON to CSV converter finds the list of records, flattens nested objects, leaves missing fields blank, quotes values correctly and produces a file with special characters preserved. Here's the routine:
- Paste the JSON, drag the file onto the field, or use the import button.
- Pick the delimiter that matches your spreadsheet.
- Check the preview: row and column counts, plus the path of the array used.
- Download the
.csvand open it in Excel. If it has codes with leading zeros, such as ZIP codes, import it via Data > From Text/CSV instead of double-clicking.
If the converter says the JSON is invalid, the problem is the content, not the conversion: run it through the JSON validator to get the exact line and column, or read how to validate JSON. Need to go the other way? See how to convert CSV to JSON.
Frequently asked questions
Can I open the CSV in Google Sheets?
Yes. Go to File > Import, upload the file and leave the separator type on “Detect automatically”. Google Sheets recognizes both commas and semicolons and reads UTF-8 natively, so special characters display correctly. You can also paste copied CSV into a cell and use Data > Split text to columns.
Why does Excel drop the leading zero from ZIP codes?
When you double-click a CSV, Excel guesses each column's type and turns 02134 into the number 2134. The file itself is fine — the zero is lost on opening. To keep it, import via Data > From Text/CSV, click Transform Data and set that column's type to Text before loading.
Can I change the column order?
Columns follow the order in which each key first appears in the JSON. To change it, reorder the keys in the first object of the array before converting, or simply move the columns in your spreadsheet afterwards. The order doesn't affect the data itself — only how it's presented.
Does CSV keep formatting, formulas or multiple sheets?
No. CSV is plain text: it stores only the values of a single table. Colors, column widths, formulas and extra sheets are all lost. If you need those, open the CSV in Excel, format it the way you want and then save it as an .xlsx workbook.