How to convert JSON to CSV
- Paste JSON into the editor, usually an array of objects such as an API response.
- Click Convert to CSV to see the result, then Export CSV to download it as a
.csvfile. - Open the file in Excel, Google Sheets, LibreOffice or any BI tool.
How the conversion works
- Rows: each object in the top-level array becomes one row. A single object becomes a single row.
- Columns: every field found in any object gets a column, in the order fields first appear. Objects that lack a field get an empty cell.
- Nested objects are flattened with dots:
{"address": {"city": "Pune"}}becomes the columnaddress.city. - Arrays become numbered columns:
tags[0],tags[1]and so on. - Values containing commas, quotes or line breaks are quoted as the CSV standard requires, so spreadsheets read them correctly.
For example:
[
{"id": 1, "name": "Ada", "address": {"city": "London"}},
{"id": 2, "name": "Linus", "email": "linus@example.com"}
] becomes:
id,name,address.city,email 1,Ada,London, 2,Linus,,linus@example.com
Tips
- If your data is wrapped, for example
{"data": [...]}, paste only the array for one row per item. - Excel may show long numbers such as phone numbers or IDs in scientific notation; format those columns as Text after importing.
- Going the other way? The CSV converter turns CSV into JSON, XML or SQL.
Conversion runs on our server in memory; the data isn't stored.
Frequently asked questions
How are nested JSON objects converted to CSV?
They are flattened into columns joined with dots, so {"address": {"city": "Pune"}} becomes a column named address.city. Arrays become numbered columns such as tags[0] and tags[1].
What if objects have different fields?
Every field from every object becomes a column. Rows that don't have a field get an empty cell.
Can I open the result in Excel?
Yes. Click Convert to CSV, then Export CSV to download a .csv file, and open it in Excel, Google Sheets or LibreOffice.
Which delimiter is used?
A comma, the standard for CSV. Values that contain commas, quotes or line breaks are wrapped in quotes.
Is my data stored?
No. It's converted on our server in memory and returned immediately.