jsoncsvconverterexceltutorial

JSON to CSV — How to Convert JSON Arrays to Spreadsheets

·6 min read

Why Convert JSON to CSV?

JSON is the standard format for APIs and web applications. CSV is the standard format for spreadsheets, databases, and data analysis tools like Excel, Google Sheets, and Pandas. Converting between them lets you take API data and work with it in the tools you already know.

What JSON Structure Works for CSV?

CSV conversion works best with a JSON array of objects where each object has the same keys. Each object becomes a row and each key becomes a column header.

json
[
  { "name": "Ravi",  "city": "Surat",     "age": 28 },
  { "name": "Priya", "city": "Ahmedabad", "age": 24 }
]

This converts to:

name,city,age
Ravi,Surat,28
Priya,Ahmedabad,24

How Nested Objects Are Handled

JSONKit flattens nested objects automatically using dot notation. A nested address object becomes separate columns named address.street, address.city, and address.pincode.

json
[{
  "name": "Ravi",
  "address": {
    "street": "MG Road",
    "city": "Surat",
    "pincode": "395007"
  }
}]

Becomes:

name,address.street,address.city,address.pincode
Ravi,MG Road,Surat,395007

Choosing a Delimiter

JSONKit lets you choose between four delimiters from the dropdown in the output stats bar. Comma is the default and works everywhere in English locale systems. Semicolon is standard in European countries. Tab produces TSV which is best for data that contains commas in the values. Pipe is useful when values contain both commas and tabs.

Changing the delimiter immediately re-converts the output without clicking Convert again.

Live Table Preview

The output panel shows a live table preview with sticky column headers and alternating row colors so you can verify the structure before downloading. Row count and column count are shown in the stats bar.

Opening CSV in Excel

After downloading, open Excel and use File then Import rather than double-clicking the file. Choose UTF-8 encoding to avoid garbled text.

In Google Sheets, go to File then Import then Upload and select the CSV file. Google Sheets auto-detects the delimiter.

Opening CSV in Python

python
import pandas as pd
df = pd.read_csv("output.csv")
print(df.head())

Try JSON to CSV

Convert JSON arrays to CSV for Excel or Google Sheets, instantly.