To transform JSON to CSV, paste a JSON array of objects into the JSON to CSV tool, keep Header row and Flatten objects enabled, pick a delimiter, click Convert, then copy the result or download data.csv. Each object becomes one data row, and nested objects become dotted columns such as address.city. This guide uses a small input with a nested object and an array, shows the exact output shape, explains which delimiter suits comma or semicolon spreadsheet settings, and finishes with import checks for Excel and Google Sheets. Tool behavior and import steps were checked on October 7, 2026.
Table of Contents

What JSON shape lets you transform JSON to CSV cleanly
Any JSON convert to CSV job starts with one question: which part of the document is the list of records? The converter accepts these shapes:
- An array of objects. Each object becomes one data row. This is the cleanest input.
- A single object. You get one row.
- An array of arrays. Each inner array is written as a row, in order.
- An array of plain values. You get one column.
A typical API response wraps the records in an outer object. That wrapper is not the records array, so paste only the array that holds the records:
{ "data": [ { "id": "0042" }, { "id": "0043" } ], "meta": { "page": 1 } }From that response, paste [ { "id": "0042" }, { "id": "0043" } ], not the whole object. If you paste the wrapper, you get a single row instead of one row per record. I cover that symptom in my guide on a JSON export that returns only one row.
If your array-of-arrays input needs column names, put them in the first inner array yourself. The Header row checkbox does not generate names for that shape.

Check the JSON before you convert it
Standard JSON, as defined in RFC 8259 (published December 2017), requires double-quoted keys and strings, and it does not allow trailing commas or comments. A paste that breaks those rules will fail before it ever reaches a spreadsheet.
The JSON Validator checks syntax with the browser’s JSON.parse and returns a normalized copy. The JSON Formatter pretty-prints a large payload so you can find the records array by eye. Neither one proves that the array you selected has the shape you want in a spreadsheet, so look at the structure yourself after validating.
If the input is broken, JSON Repair can fix common formatting mistakes, but a repair can change meaning. Compare the values against the source and fix whatever produces the bad JSON in the first place.
Keep long numeric identifiers as strings in your source. JSON.parse can round large integers, which is why large integer IDs can change when a validator normalizes them. Quoting an ID in the source is the safe choice.

A worked example: nested address and a tags array
This input has two records. The first has a nested address object and a tags array. The second is missing postcode and has score set to null. All data is fictitious.
[
{
"id": "0042",
"name": "Ana Silva",
"address": { "city": "Lisbon", "postcode": "01234" },
"tags": ["admin", "beta"],
"score": 4.5
},
{
"id": "0043",
"name": "Ben Okoye",
"address": { "city": "Leeds" },
"tags": ["trial"],
"score": null
}
]With Flatten objects on and a comma delimiter, expect output shaped like this:
id,name,address.city,address.postcode,tags,score 0042,Ana Silva,Lisbon,01234,"[""admin"",""beta""]",4.5 0043,Ben Okoye,Leeds,,"[""trial""]",
The exact column order and spacing inside the tags cell may differ, so compare against your real output. Several things are worth noticing:
- Columns come from the keys found across all rows, so the missing
postcodeand thenullscore both become empty cells. - The array stays as JSON text in one cell, whether flattening is on or not. It does not create extra rows. The cell is quoted because it contains quotes, and the embedded quotes are doubled.
- With flattening off, the whole
addressobject would stay as JSON text in one cell instead of becoming two columns. - An empty nested object produces no column. A literal key that contains a dot can collide with a flattened path, and the converter says the later value silently wins.
Because missing and null both turn into empty cells and CSV keeps no value types, this conversion is not reliably reversible. The IDs here are text like 0042, which matters later in the spreadsheet, as the case of ZIP code 02134 becomes 2134 shows.
Steps to transform JSON to CSV in the tool
- Open the JSON to CSV tool and paste your JSON array, or import it from a file.
- Choose a delimiter. Use comma unless the receiving spreadsheet expects something else (see the next section).
- Tick Header row when the input is an array of objects, so the keys become the first line.
- Leave Flatten objects enabled if nested properties should get their own columns, such as
address.city. - Click Convert and read the output before you use it.
- Copy the CSV, or download it as
data.csv.
This works because the converter walks each record, collects the keys across all rows into a column list, and writes one line per record. It quotes any cell that contains the delimiter, a quote or a line break, doubles embedded quotes, and ends rows with CRLF. Those quoting rules match the comma-separated convention in RFC 4180, published in October 2005.
The downloaded file is UTF-8 without a byte-order mark. That detail matters for Excel, which I cover below.
Choose the right delimiter for your spreadsheet
A delimiter is the character that separates cells on each line. The choice depends on what will read the file.
| Delimiter | Pick it when | Watch for |
|---|---|---|
| Comma | The import expects conventional CSV. | Cells containing commas are quoted, which is normal. |
| Semicolon | The spreadsheet expects semicolons, often where a decimal comma is used. | Verify in the import preview; regional installations differ. |
| Tab | A downstream importer specifies tab-separated text. | This is delimiter-separated text, not RFC 4180 CSV. |
| Pipe | A downstream importer specifies pipes. | Same caveat as tab. |
Semicolon changes only the separator. A number such as 4.5 in the JSON stays 4.5 in the output; the tool does not turn it into 4,5. If your spreadsheet expects a decimal comma, check how the numbers land in the preview and adjust the column type or locale on import.
When in doubt, convert with comma, open the import dialog, and look at the preview. If everything lands in one column, re-import with a different separator or convert again with another delimiter.
Open the CSV in Excel or Google Sheets
In Excel, import the file instead of double-clicking it. Use Data > From Text/CSV and check the delimiter, the encoding and the column types in the preview. Microsoft documents that a UTF-8 CSV without a byte-order mark may need import rather than direct opening, and the downloaded file has no BOM. Accented characters are the thing to look for. The general steps are in Microsoft’s guide to importing or exporting text and CSV files.
Set identifier and postal code columns to text during import so leading zeros such as 0042 survive.
In Google Sheets, use File > Import > Upload and select the separator type in the import options. Google’s page on importing files into Sheets describes the dialog. Product pages do not promise identical behavior in every app version, so trust the preview over assumptions.
Verify the CSV and treat untrusted cells with care
A clean conversion is not proof the data is right. After import, check these things:
- The column count matches the header you expected.
- The row count matches the number of records in your array.
- Accented characters and decimals look correct.
- Identifiers kept their leading zeros.
- Array cells still hold readable JSON text.
Be careful with untrusted data. The converter writes values that begin with =, +, - or @ unchanged, and some spreadsheets can treat such values as formulas. Review that kind of input before you import it or share the file.
You can load the CSV back with the CSV to JSON tool as a rough sanity check, but expect differences: nulls and missing keys are both empty, and CSV carries no JSON value types, so numbers, booleans and nulls will not reliably return as they were. The CSV round trip in my longer guide, How to Convert CSV to JSON: The Complete Guide for Developers, shows how those choices go the other way. If you still need to edit the JSON itself, the JSON Editor offers syntax validation and format or minify, with no tree view or JSON Schema validation.
Frequently asked questions
How to convert a JSON to CSV?
Paste a JSON array of objects into the JSON to CSV tool, choose a delimiter, tick Header row, leave Flatten objects on if you have nested objects, click Convert, then copy the output or download data.csv. Inspect the result before importing it.
How do I change JSON to CSV when the objects are nested?
Keep Flatten objects enabled. A nested property such as address.city becomes its own column named address.city. With flattening off, the nested object stays as JSON text in a single cell.
What happens to arrays inside a record?
They stay as JSON text in one cell, with or without flattening, and do not create extra rows. If you need one row per array item, restructure the data first so that array is the records array.
Which delimiter should I use for my regional spreadsheet settings?
Use comma for conventional CSV. Use semicolon if your spreadsheet expects it, which is often the case where a decimal comma is used. Check the import preview rather than assuming, because installations vary. Semicolon does not change decimal numbers in the output.
Why did the leading zeros disappear in Excel?
Excel guesses column types and may treat 0042 as a number. Import through Data > From Text/CSV and set identifier and postal code columns to text. The CSV itself keeps the zeros as long as the JSON value was a string.
Can I convert the CSV back into the same JSON?
Not reliably. Missing keys and null both become empty cells, CSV keeps no value types, and arrays are stored as text. A dotted key can also collide with a flattened path, with the later value winning.
Is it safe to open a converted CSV that came from untrusted JSON?
Review it first. Values beginning with =, +, – or @ are written unchanged, and some spreadsheets can interpret such values as formulas. Check or sanitize suspicious cells before importing or sharing the file.
Next steps
To transform JSON to CSV reliably, start from a records array, validate the syntax, convert with Header row and Flatten objects set deliberately, pick a delimiter that matches the importing app, and inspect the spreadsheet. Next, try the small example above in the converter, change the delimiter to a semicolon, and import both versions so you can see which one your spreadsheet reads correctly.
Related tools and resources on HTML Editor Online:
Sources and further reading
- https://www.rfc-editor.org/info/rfc8259/
- https://www.rfc-editor.org/rfc/rfc4180.html
- https://support.microsoft.com/en-us/excel/opening-csv-utf-8-files-correctly-in-excel
- https://support.microsoft.com/en-us/excel/get-started/import-or-export-text-txt-or-csv-files?ad=US&rs=en-US&ui=en-US
- https://support.google.com/docs/answer/12236443?hl=en
- JSON to CSV – Free Online JSON to CSV Converter | HTML Editor Online
