Got JSON data you need in a spreadsheet? Here's how to get there.
Python with pandas (fastest)
import pandas as pd
import json
with open("data.json") as f:
data = json.load(f)
df = pd.DataFrame(data)
df.to_excel("output.xlsx", index=False)
print("Done.")
Install deps first:
pip install pandas openpyxl
Handling nested JSON
Nested objects need flattening first:
from pandas import json_normalize
with open("data.json") as f:
data = json.load(f)
df = json_normalize(data) # flattens nested keys with dot notation
df.to_excel("output.xlsx", index=False)
Nested key address.city becomes column address.city in your spreadsheet.
Node.js option
const XLSX = require("xlsx");
const data = require("./data.json");
const ws = XLSX.utils.json_to_sheet(data);
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, "Sheet1");
XLSX.writeFile(wb, "output.xlsx");
npm install xlsx
No-code option
The free JSON to Excel tool converts your JSON to a properly formatted .xlsx file in seconds — paste your JSON or upload a file, click convert, download.
No Python, no Node, no setup.
Top comments (0)