Skip to content
Tools

JSON to CSV Converter

Last updated:

This converter turns an array of JSON objects into CSV: one row per object, one column per key, with a header row built from every key it finds. Nested objects are flattened into dotted column names such as address.city, and values containing commas or quotes are quoted per RFC 4180.

Runs in your browser: your data never leaves your device – nothing is uploaded, logged or stored on a server. How we protect your data

100% in-browserNothing is uploaded

Input

Loading editor…

Paste JSON here

or drop a file anywhere in this box. Everything stays in your browser.

Drop a file to load it

Output

Loading editor…

CSV appears here

Results update as you type.

How to use the JSON to CSV

  1. Paste a JSON array of objects (or an object whose values are records).
  2. Check the header: columns are the union of keys across all rows, in first-seen order.
  3. Choose the delimiter if your spreadsheet locale expects semicolons.
  4. Download the .csv file or copy it and paste into a sheet.

Worked example

Two users with a nested address; one name contains a comma

Input

[{"id":1,"name":"Ada","address":{"city":"London"}},{"id":2,"name":"Grace, Hopper","address":{"city":"NYC"}}]

CSV

id,name,address.city
1,Ada,London
2,"Grace, Hopper",NYC

address.city comes from flattening the nested object. "Grace, Hopper" is quoted because it contains the delimiter.

How JSON shapes become CSV

How JSON shapes become CSV
JSONCSV result
Nested object {"a":{"b":1}}Column a.b
Key missing in some rowsEmpty cell in those rows
nullEmpty cell
Array of valuesKept as JSON text in one cell (CSV has no lists)
Text with a comma, quote or newlineWrapped in double quotes; inner " doubled to ""
true / falsetrue / false as text

Arrays inside records

CSV is flat: every cell holds one value. When a record contains a list, such as tags: ["a","b"], there is no lossless place to put it. Keeping the list as JSON text in a single cell preserves the data so it can be parsed back. If you need one row per tag instead, extract the list first with a JSONPath query and convert that.

Opening the file in Excel

Excel guesses types as it opens a CSV: long numeric IDs turn into scientific notation and lose digits after the 15th, values like 1-2 become dates, and leading zeros vanish. Use Data > From Text/CSV and set those columns to Text. If accented characters look garbled, the file is UTF-8 and Excel picked another encoding; choose UTF-8 in the import dialog.

JSON to CSV FAQ

How do I convert nested JSON to CSV?

Flatten it: each nested key becomes a column whose name is the full path joined by dots, like address.city. This tool does that automatically for objects at any depth.

Why is my JSON to CSV output only one row?

The input is probably a single object rather than an array. Wrap it in [ ] or point the converter at the array inside, e.g. the data or items field of an API response.

Can I open the CSV in Google Sheets?

Yes. Use File > Import > Upload, or paste the copied CSV into cell A1 and choose Split text to columns.

What happens when rows have different keys?

The header is the union of all keys. Rows that lack a key get an empty cell in that column, so no data is dropped.

Is there a size limit for JSON to CSV?

No fixed limit is imposed; conversion happens in your browser, so the practical limit is your device's memory. Files of tens of megabytes are fine on a typical laptop.

Related tools