JSON to CSV
Convert a JSON array of objects (or a single object) into CSV format.
Drop a file or click to browse
or paste data below
Need the reverse conversion? CSV to JSON
How JSON to CSV works
How columns are built
The input should be an array of objects, like most API list responses. A single object is also accepted and becomes one row. The converter collects every key from every object, in the order it first sees them, and makes each key a column. Objects do not need the same shape: if a record has no address, its address cell is blank.
Because columns come from all records rather than only the first, a field that appears only in record 500 still gets a column. For examples of both formats and their data types, see CSV vs TSV vs JSON.
Nested objects, arrays, and nulls
A CSV cell holds one value, so nested objects and arrays are written as compact JSON text, such as ["admin","beta"] or {"city":"Pune"}. Nothing is lost, and the cell can be parsed back later. If you want address.city as its own column instead, use Flatten JSON, which expands nested objects into dotted column names.
null and missing values both become empty cells. Booleans are written as true and false, and numbers as they appear in the JSON.
Quoting in the output
Values containing commas, double quotes, or line breaks are quoted according to RFC 4180, so Lee, Jr. stays in one column. JSON text for nested values contains quotes, so those cells are quoted and their inner quotes doubled. Spreadsheet apps undo this automatically when they open the file. Rows end with CRLF line breaks.
The input has to be valid JSON as a whole. JSON Lines files (one object per line) need square brackets around them and commas between the lines first. Our guide to converting JSONL to CSV covers that case.
Example
Every key becomes a column even though no object has all of them; the array and object are kept as JSON text.
[
{ "id": 1, "name": "Ana", "tags": ["admin", "beta"] },
{ "id": 2, "name": "Raj", "address": { "city": "Pune" }, "active": false },
{ "id": 3, "name": "Lee, Jr.", "active": null }
]id,name,tags,address,active
1,Ana,"[""admin"",""beta""]",,
2,Raj,,"{""city"":""Pune""}",false
3,"Lee, Jr.",,,How to use JSON to CSV
- 1
Paste a JSON array of objects or drop a .json file.
- 2
If the JSON is invalid, the parser error is shown; fix it and the CSV updates.
- 3
Check the header row for unexpected columns from inconsistent keys.
- 4
Copy the CSV or download converted.csv.
When to use it
API data into a spreadsheet
Save a list endpoint's response and open it in Excel or Google Sheets for review or reporting.
Comparing records
Spot missing or inconsistent fields across records by viewing them as columns.
JSON to CSV questions
My API response wraps the array in an object. What do I do?
If the list is under a key such as data or results, paste only that array. Otherwise the wrapper object becomes a single row with the array stored as JSON text.
How do I get nested fields as separate columns?
Use Flatten JSON, which turns {"user": {"name": ...}} into a user.name column.
Can I control the column order?
Columns follow the order keys first appear. To reorder or drop columns, run the CSV through Column Tools.
Questions about privacy, file size, or accounts are answered on the FAQ page.
More converters
Other tools in the same category, starting with the reverse conversion
CSV to JSON
Turn CSV or TSV rows into a JSON array of objects keyed by the header row
Flatten JSON
Flatten nested JSON into CSV columns with dotted names, or nest dotted columns back into JSON
JSON to Excel
Turn a JSON array of objects into a single-sheet .xlsx workbook
JSON to TSV
Convert a JSON array of objects into tab-separated rows you can paste into a spreadsheet
JSON Preview
View a JSON array of objects as a table, with one column per key