How to Convert JSON to CSV (and Open the Result in Excel)
Turn an API export or JSON file into a spreadsheet. See how nested objects and arrays are flattened, what missing keys become, and how to open the CSV in Excel.
Updated November 4, 20268 min read
To convert JSON to CSV, paste the JSON (or drop a .json file) into the converter, press Convert to CSV, then download the file or copy the text. The tool turns each object in your array into one row, builds the header from every key it finds, and joins nested objects into dot-separated column names such as user.name. Excel opens the CSV directly, which is why this is the usual route for "JSON to Excel". The part that surprises people is what happens to arrays, missing keys and the column order, so this guide spells out exactly what the tool does.
What shape of JSON works
The converter expects what most APIs and exports return: an array of objects, such as a list of orders or users. Each object becomes one row. A single object also works and becomes a one-row table. If the array contains plain values instead of objects (numbers or strings), each one becomes a row in a single column called value. An empty array produces no output at all.
If you have a response that wraps the list in another object, for example {"data": [ ... ]}, the converter will treat the whole thing as one row with a column containing the list as text. Copy just the inner array and paste that instead. If the JSON is not valid, you get the message "Invalid JSON. Check brackets, commas, and quotes." Run it through the JSON formatter first to find the broken spot; the guide on formatting JSON online shows what the usual mistakes look like.
Converting JSON to CSV, step by step
Open the converter
Go to the JSON to CSV converter. Everything runs on your device, not our servers, so an export with customer data is not uploaded.
Paste the JSON or drop the file
Paste into the box labelled JSON input, or drop a .json file on it. For a file, leave Encoding (file) on UTF-8 unless you know the file was saved in a Windows code page.
Press Convert to CSV
The CSV appears in the output box underneath. Scan the header row first: that is where you see how your nested fields were named.
Download or copy
Download CSV saves a file called data.csv. Copy CSV puts the text on the clipboard so you can paste it into a spreadsheet or another tool.
Paste or drop JSON, flatten it into columns and download the CSV. Free: one file at a time with a comma delimiter, and no row cap set by us, so the limit is your device's memory. Pro: choose semicolon, tab or pipe. Runs on your device.
Convert JSON to CSVHow nested data is flattened
A CSV is a flat grid, and JSON is a tree, so something has to give. The tool follows two simple rules. Nested objects are walked down, and each path becomes a column name joined with dots. Arrays are not expanded: the whole array is written into the cell as JSON text.
| In the JSON | Column in the CSV | Cell value |
|---|---|---|
| "name": "Ada" | name | Ada |
| "address": { "city": "Pune" } | address.city | Pune |
| "a": { "b": { "c": 1 } } | a.b.c | 1 |
| "tags": ["x", "y"] | tags | ["x","y"] (as text, quoted) |
| "items": [{ "id": 1 }] | items | [{"id":1}] (as text, quoted) |
| "note": null | note | (empty) |
| "paid": true | paid | true |
| "meta": {} | (no column) | An empty object adds nothing |
The honest consequence: a record with five line items in an array does not become five rows. It stays one row with the line items sitting in one cell as text. If you need one row per line item, extract that inner array and convert it on its own, then keep an order ID in each item so you can match them up later. The tool has no switch to keep the nesting or to explode arrays, and it does not use any other separator than the dot for paths.
Missing keys, column order and empty cells
Real exports are uneven: one customer has a phone number, the next does not. The converter reads every record first and collects the union of all the column names it sees. A record that lacks a key gets an empty cell in that column, so every row has the same number of cells and nothing slides sideways. A value of null also becomes an empty cell, which means the CSV cannot tell "missing" from "null".
The columns are sorted alphabetically, not kept in the order of your JSON. The sort is by character code, so capital letters come before lowercase, and numbers come before letters. An id field will not necessarily be first; you will usually move columns around in your spreadsheet afterwards. Numbers and true/false are written as their plain text, and a JSON number such as 12.50 is written as 12.5.
| Record | id | name | phone |
|---|---|---|---|
| { "id": 1, "name": "A", "phone": "555-0100" } | 1 | A | 555-0100 |
| { "id": 2, "name": "B" } | 2 | B | (empty) |
| { "id": 3, "name": "C", "phone": null } | 3 | C | (empty) |
Delimiter, quoting and encoding
Free output always uses a comma. Choosing a different delimiter (semicolon, tab or pipe) is a Pro option on the Delimiter menu. Whatever delimiter is used, any value containing that delimiter, a double quote or a line break is wrapped in double quotes, and quotes inside it are doubled. That is the standard way, so addresses like "12 Main St, Apt 4" stay in one cell.
| Option | Where it applies | Notes |
|---|---|---|
| Comma | Default, all plans | The most widely accepted CSV |
| Semicolon | Pro | What Excel expects in many European regional settings |
| Tab | Pro | Tab-separated values (TSV) |
| Pipe | Pro | Some data pipelines |
| UTF-8 / Windows-1252 / ISO-8859-1 | Reading an uploaded file | Only changes how the .json file is read, not the CSV you download |
The Encoding (file) menu is easy to misread. It controls how an uploaded JSON file is decoded. JSON is almost always UTF-8, so leave it alone unless names with accents show up as odd symbols after you load the file. The downloaded CSV is written as plain UTF-8 text, and the tool does not add a byte-order mark. If you paste the JSON instead of uploading it, the encoding menu has no effect.
Opening the CSV in Excel
Double-clicking a UTF-8 CSV without a byte-order mark can make Excel guess an older encoding, so accented letters and non-Latin text turn into strange characters. Instead of double-clicking, open a blank workbook and use Data, then From Text/CSV, and pick UTF-8 as the file origin. The preview window also lets you set the delimiter, which solves the other common problem: in regions where Excel expects a semicolon, a comma-separated file lands in a single column. Choose Comma in that window and it splits correctly. The full walkthrough is in opening a CSV in Excel correctly.
Two other things happen on the Excel side and are not caused by the converter. Long numbers such as 16-digit card or tracking IDs are shown in scientific notation, and values with leading zeros such as 00123 lose the zeros. Set those columns to Text in the import preview before loading. If you would rather skip the import dialog, run the CSV through CSV to Excel to get a workbook, or use the CSV viewer just to look at it.
Limits and things to know before a big export
- One file at a time. The converter takes a single JSON file per run.
- No row cap and no watermark. Because everything runs on your device, the real limit is how much memory your device has. A very large file may slow the page down; split it first if so.
- Everything is text. The CSV has no types. Dates stay as the strings they were in the JSON, and numbers are just digits.
- Formulas are not escaped. A value that starts with = + - or @ is copied as it is, and a spreadsheet may treat it as a formula. Check exports from untrusted sources before opening them.
- Dots in keys can collide. A key literally named "a.b" and a nested a with b inside would land in the same column.
- Going back is a separate step: CSV to JSON rebuilds JSON from a table, though it cannot restore the exact original nesting.
If you are deciding whether CSV is even the right target for your data, JSON vs CSV vs XML compares what each format keeps and loses.
Frequently asked questions
How do I convert JSON to CSV for free?
Open the JSON to CSV converter, paste your JSON or drop a .json file, press Convert to CSV, then use Download CSV or Copy CSV. Free gives you one file at a time with a comma delimiter, and there is no row limit set by us.
How do I convert JSON to Excel?
Convert to CSV first, then open Excel and use Data, From Text/CSV, choosing UTF-8 and the comma delimiter in the preview. You can also run the CSV through CSV to Excel to get a .xlsx workbook.
What happens to nested objects and arrays?
Nested objects become separate columns with dot-separated names, such as address.city. Arrays are not split into rows; the whole array is written into one cell as JSON text.
Why are some cells empty in my CSV?
The tool collects every key from every record. A record that lacks a key, or has it set to null, gets an empty cell in that column so all rows stay aligned.
Why do accented letters look wrong when I open the CSV in Excel?
Excel can guess the wrong encoding when you double-click a UTF-8 file. Import it with Data, From Text/CSV and select UTF-8 as the file origin instead. The converter writes plain UTF-8 and does not add a byte-order mark.
Can I use a semicolon or tab instead of a comma?
Yes, with Pro: the Delimiter menu offers comma, semicolon, tab and pipe. On the free plan the output uses a comma, and Excel's import preview lets you pick it as the separator.