Convert JSON to Excel: Complete Guide with Tools 2026
Learn how to convert JSON to Excel files. Covers online tools, Python pandas, JavaScript libraries, and automated conversion methods.
Big JSON Team
• Technical WriterExpert in JSON data manipulation, API development, and web technologies. Passionate about creating tools that make developers' lives easier.
Why Convert JSON to Excel?
Excel is widely used for data analysis and sharing. Converting JSON to Excel makes data accessible to non-technical users.
Online Converters
Big JSON Viewer
Other Tools
- ConvertCSV.com
- JSON-to-Excel.com
- Code Beautify
Python with Pandas
Simple Conversion
import pandas as pd
import json
# Load JSON
with open('data.json') as f:
data = json.load(f)
# Convert to DataFrame
df = pd.DataFrame(data)
# Save to Excel
df.to_excel('output.xlsx', index=False)
Nested JSON
import pandas as pd
# Flatten nested JSON
df = pd.json_normalize(data, sep='_')
df.to_excel('output.xlsx', index=False)
Multiple Sheets
with pd.ExcelWriter('output.xlsx') as writer:
df1.to_excel(writer, sheet_name='Users', index=False)
df2.to_excel(writer, sheet_name='Orders', index=False)
JavaScript/Node.js
Using xlsx Library
const XLSX = require('xlsx');
const fs = require('fs');
// Read JSON
const data = JSON.parse(fs.readFileSync('data.json'));
// Create worksheet
const ws = XLSX.utils.json_to_sheet(data);
// Create workbook
const wb = XLSX.utils.book_new();
XLSX.utils.book_append_sheet(wb, ws, 'Sheet1');
// Write file
XLSX.writeFile(wb, 'output.xlsx');
Command Line
Using jq and csvkit
# JSON to CSV
jq -r '(.[0] | keys_unsorted) as $keys | $keys, map([.[ $keys[] ]])[] | @csv' data.json > output.csv
# CSV to Excel (requires csvkit)
csvformat output.csv > output.xlsx
Handling Complex JSON
Arrays of Objects (Best Format)
[
{"name": "Alice", "age": 30},
{"name": "Bob", "age": 25}
]
Nested Objects
# Flatten before converting
df = pd.json_normalize(data, sep='.')
Excel Formatting
Python with openpyxl
from openpyxl import load_workbook
from openpyxl.styles import Font
# Convert to Excel
df.to_excel('output.xlsx', index=False)
# Add formatting
wb = load_workbook('output.xlsx')
ws = wb.active
# Bold headers
for cell in ws[1]:
cell.font = Font(bold=True)
wb.save('output.xlsx')
Best Practices
Common Issues
Mixed Data Types
# Convert all to strings if needed
df = df.astype(str)
Large Files
Use chunking for files over 100MB:
chunks = pd.read_json('large.json', lines=True, chunksize=10000)
for i, chunk in enumerate(chunks):
chunk.to_excel(f'output_{i}.xlsx', index=False)
Conclusion
For quick conversions, use Big JSON Viewer. For automation, use Python pandas. Both methods produce professional Excel files!
Related Articles
What is JSON? Complete Guide for Beginners 2026
Learn what JSON is, its syntax, data types, and use cases. A comprehensive beginner-friendly guide to understanding JavaScript Object Notation.
Python and JSON: Complete Guide to json Module
Master JSON in Python with the json module. Learn to parse, generate, and manipulate JSON data with practical examples and best practices.
JSON in Data Science: Python and Pandas Guide
Complete guide to JSON in data science workflows. Learn to process JSON with Python, Pandas, and integrate into ML pipelines.