JSON to Excel Converter
Convert JSON arrays to Excel spreadsheets. Paste your JSON data below:
address.city).Convert JSON to Excel Format
This tool converts JSON data into Excel spreadsheets that you can open in Microsoft Excel, Google Sheets, or any spreadsheet application. It handles arrays of objects, nested data structures, and various data types automatically.
How to Use
- Paste your JSON โ Input should be an array of objects
- Configure options โ Set sheet name and flattening preferences
- Preview the result โ Click Preview to see how your data will look
- Download โ Click Download Excel to get your .xls file
JSON to Excel vs JSON to CSV
Both formats export tabular data, but Excel offers advantages for certain use cases:
| Feature | Excel | CSV |
|---|---|---|
| Multiple sheets | โ Yes | โ No |
| Data types | โ Numbers, dates, booleans | โ Text only |
| Formatting | โ Styles, colors, widths | โ None |
| File size | Larger | Smaller |
| Compatibility | Excel, Sheets, Numbers | Universal |
Use Excel when you need formatting, multiple sheets, or proper data types. Use CSV for maximum compatibility or smaller files.
Handling Nested JSON
When your JSON contains nested objects, the converter flattens them using dot notation for column headers:
// Input
{
"name": "Alice",
"address": {
"city": "New York",
"zip": "10001"
}
}
// Excel columns
| name | address.city | address.zip |
|-------|--------------|-------------|
| Alice | New York | 10001 |Arrays within objects
Arrays are converted to comma-separated strings:
// Input
{ "name": "Alice", "skills": ["Python", "JavaScript"] }
// Excel output
| name | skills |
|-------|---------------------|
| Alice | Python, JavaScript |Data Type Handling
The converter preserves data types where possible:
- Numbers โ Stored as numeric values (sortable, summable)
- Booleans โ Converted to 1/0 for Excel compatibility
- Strings โ Stored as text
- Null/undefined โ Empty cells
- Objects โ Flattened or stringified
Example Conversion
Input JSON:
[
{
"id": 1,
"name": "Alice Johnson",
"department": "Engineering",
"salary": 95000,
"active": true
},
{
"id": 2,
"name": "Bob Smith",
"department": "Marketing",
"salary": 65000,
"active": true
}
]This produces an Excel file with columns: id, name, department, salary, active โ with proper numeric formatting for id and salary.
Programmatic Conversion
JavaScript (with SheetJS)
import * as XLSX from 'xlsx';
const data = [{ name: "Alice", age: 30 }];
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");Python (with pandas)
import pandas as pd
import json
data = json.loads('[{"name": "Alice", "age": 30}]')
df = pd.DataFrame(data)
df.to_excel("output.xlsx", index=False)Related Tools
- Excel to JSON โ Convert Excel back to JSON
- JSON to CSV โ Simpler tabular format
- JSON to Table โ Preview as HTML table
- JSON Flatten โ Flatten nested objects first
- JSON Validator โ Validate JSON before converting
Frequently Asked Questions
Can I convert nested JSON to Excel?
Yes! Enable "Flatten nested objects" to convert nested structures into dot-notation columns (e.g., address.city). Arrays become comma-separated values.
What's the maximum file size?
The conversion runs entirely in your browser, so there's no server limit. However, very large datasets (10,000+ rows) may slow down your browser. For massive files, consider using a programming library.
Does it preserve data types?
Yes. Numbers remain numeric (sortable, usable in formulas), booleans become 1/0, and strings remain text. This is an advantage over CSV which treats everything as text.
Can I customize column order?
Column order follows the order of keys in your first JSON object. To reorder, restructure your JSON or reorder columns in Excel after export.
Why .xls instead of .xlsx?
We use Excel XML format (.xls) for browser compatibility without external dependencies. This format opens in all modern spreadsheet applications including Excel 2007+, Google Sheets, and LibreOffice.