About the JSON to CSV
APIs, databases and web apps hand out data as JSON, but spreadsheets want rows and columns. The JSON to CSV converter turns a JSON array of records into a CSV table you can open in Excel, Google Sheets or Numbers, import into a database, or send to someone who does not read JSON.
Every key becomes a column, even when it appears in only some records. Nested objects are flattened into columns like address.city, lists can be kept as JSON or joined into one cell, and values that contain commas, quotes or line breaks are quoted the way spreadsheet programs expect. A preview table shows the first 50 rows so you can check the columns before you download.
The download is ready for Excel: it adds the byte order mark that makes Excel read accented letters correctly and uses Windows line endings. Numbers are copied exactly as written in your JSON, and everything runs in your browser, so your data never leaves your device.
How to use it
- Add your JSONPaste an array of objects, drop a .json file onto the box, or use Open. Sample loads three contact records.
- Choose a delimiterComma is the standard. Pick semicolon if your Excel uses commas as the decimal separator, or tab for a TSV file.
- Decide how to handle nestingLeave "Flatten nested objects" on to turn address.city into its own column. For lists inside a record, keep them as JSON or join them with a semicolon.
- Check the previewThe status line shows the number of rows and columns, and the Preview table shows the first 50 rows as they will appear in a spreadsheet.
- Copy or downloadCopy the CSV text, or download data.csv (data.tsv for tabs). Leave "Excel friendly download" on if the file is going to Excel.
Key features
All keys become columns
Columns are collected from every record in the order they first appear. Records without a key get an empty cell.
Nested objects flattened
{"address": {"city": "Lisbon"}} becomes a column called address.city, at any depth.
Lists handled
Keep a list as JSON text, like ["admin","editor"], or join simple lists into one cell, like admin; editor.
Correct quoting
Values with the delimiter, quotes, line breaks or spaces at either end are quoted, with inner quotes doubled. You can also quote every field.
Exact numbers
Numbers are copied as written, so 12345678901234567890 and 1.10 reach the CSV unchanged.
Private by design
The JSON is turned into CSV on your device, with no upload.
Examples
Converting contact records
The Sample button loads three records. The third one has no email, no country and no tags, but has an "active" key the others lack:
[{"id": 1, "name": "Ana Silva", "email": "ana@example.com", "address": {"city": "Lisbon", "country": "PT"}, "tags": ["admin", "editor"]},
{"id": 2, "name": "Okafor, Mia", "email": "mia@example.com", "address": {"city": "Lagos", "country": "NG"}, "tags": []},
{"id": 3, "name": "Lee \"LC\" Chen", "address": {"city": "New York"}, "active": false}]
The status line reads 3 rows × 7 columns, and the CSV is:
id,name,email,address.city,address.country,tags,active
1,Ana Silva,ana@example.com,Lisbon,PT,"[""admin"",""editor""]",
2,"Okafor, Mia",mia@example.com,Lagos,NG,[],
3,"Lee ""LC"" Chen",,New York,,,false
"Okafor, Mia" is quoted because of its comma, the quotes around LC are doubled, and missing values are left empty.
Lists: keep as JSON or join
| JSON list | Keep as JSON | Join |
|---|---|---|
["admin", "editor"] | ["admin","editor"] | admin; editor |
[] | [] | (empty) |
Lists that contain objects or other lists always stay as JSON, because they cannot be joined into a readable cell.
Without flattening
Turn off "Flatten nested objects" and the sample has 6 columns instead of 7. The address stays together as JSON text in one cell:
id,name,email,address,tags,active
1,Ana Silva,ana@example.com,"{""city"":""Lisbon"",""country"":""PT""}","[""admin"",""editor""]",
Other JSON shapes
| Your JSON | CSV result |
|---|---|
{"a1": {"qty": 2}, "b7": {"qty": 5}} | A key column, then qty: 2 rows |
{"name": "Ana", "age": 34} | One row with 2 columns |
[["sku", "qty"], ["A1", 2]] | Each inner list is one row |
[1, "two", true] | One column called value |
42 | Error: a single value has no columns |
Tips
- If Excel puts everything in column A, your Excel expects semicolons. Choose Semicolon as the delimiter and download again.
- Keep "Excel friendly download" on for Excel. Google Sheets, databases and most programming tools read the file fine either way.
- Use "Join with a semicolon" for simple lists like tags or categories. They are easier to read and filter in a spreadsheet than JSON text.
- If your JSON is wrapped in an object, such as {"data": [...]}, paste only the array inside it. Otherwise you get a single row.
- To go the other way, the CSV to JSON converter turns a spreadsheet export back into JSON records, and can rebuild nested objects from address.city style headers.
Common mistakes and limits
- Pasting the whole API responseMany APIs wrap records in an object with fields like "data", "items" or "results". Paste the array of records itself to get one row per record.
- Opening the CSV by double-clicking in ExcelDepending on your region, Excel may split columns at the wrong character or turn long numbers into 1.23457E+19. Use Data > From Text/CSV and set those columns to Text if exact values matter.
- Expecting lists to become separate rowsEach record is one row. A list inside a record goes into one cell, as JSON or joined. It is not spread over several rows.
- Values that start with =, + or @Spreadsheet programs may treat a cell that starts with = as a formula. The converter copies values exactly, so check data from untrusted sources before opening it in Excel.
- Forgetting that the header can be turned offIf you are appending rows to an existing sheet, turn off "Include the header row" so the column names are not added again.