RSRobince Studio
JSON & Data Tools

How to convert JSON to CSV, with a worked example

JSON is a tree and CSV is a table, so converting between them means deciding how to flatten the tree into columns. This guide shows how that works on a small example, how nested fields and arrays end up in the file, and the Excel pitfalls to avoid.

2 min read Reviewed

On this page
  1. The short answer
  2. A worked example
  3. Step by step
  4. Pitfalls to watch for
  5. Is it safe for private data?
  6. Frequently asked questions
  7. Try these tools

The short answer

Paste or open a JSON array of objects, let the converter flatten nested fields into columns, choose the delimiter and download the CSV. Each object becomes a row and each key becomes a column header.

The input should be an array of similar objects. Each object becomes one row.

A worked example

Take this JSON with two people. Each has a nested address object and a list of tags.

[{"name":"Asha","age":29,"address":{"city":"Pune","pin":"411001"},"tags":["a","b"]},{"name":"Ravi","age":34,"address":{"city":"Delhi","pin":"110001"},"tags":["c"]}]

After flattening, the nested object becomes columns with dotted names and the list is kept as text in one cell:

nameageaddress.cityaddress.pintags
Asha29Pune411001["a","b"]
Ravi34Delhi110001["c"]

Step by step

  1. Open the JSON to CSV tool and paste your JSON array.
  2. Keep flattening on if your objects contain nested objects.
  3. Choose a delimiter: comma, semicolon, tab or pipe.
  4. Download the CSV.
  5. To open it as a real spreadsheet with numbers and a header row, convert it with the CSV to Excel tool.

Pitfalls to watch for

  • Leading zeros: a PIN or ZIP code such as 01234 can lose its zero when Excel opens a CSV and treats the column as a number. Convert to .xlsx with text columns kept as text, or import the column as text.
  • Delimiters: in many European settings Excel expects semicolons. If everything lands in one column, change the delimiter.
  • Arrays: a list becomes one text cell. If you need one row per list item, restructure the JSON first.
  • Missing keys: if some objects lack a key, that cell is empty.
  • Dates and large numbers: very long numbers can be shown in scientific notation. Keep them as text.

Is it safe for private data?

The conversion runs in your browser, so an API response with customer data is not uploaded. Check the network tab of your browser’s developer tools if you want to verify it.

Frequently asked questions

How do I convert a JSON file to CSV?

Paste the JSON array into a converter, flatten nested fields, choose a delimiter and download the CSV.

What happens to nested JSON objects?

They are flattened into separate columns with dotted names, such as address.city.

What happens to arrays in JSON?

A list inside an object is kept as JSON text in a single cell.

Why does Excel put everything in one column?

Excel expects a different delimiter for your regional settings. Try a semicolon or tab instead of a comma.

Can I convert CSV back to JSON?

Yes, with the CSV to JSON tool.

Try these tools

Keep reading