{}JSONLint.app

JSON to Excel Converter

Convert JSON arrays to Excel spreadsheets. Paste your JSON data below:

Loading...
Click "Preview" to see table structure
💡 Tip: Your JSON should be an array of objects where each object becomes a row. Nested objects will be flattened to dot notation (e.g., 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

  1. Paste your JSON — Input should be an array of objects
  2. Configure options — Set sheet name and flattening preferences
  3. Preview the result — Click Preview to see how your data will look
  4. 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:

FeatureExcelCSV
Multiple sheets✅ Yes❌ No
Data types✅ Numbers, dates, booleans❌ Text only
Formatting✅ Styles, colors, widths❌ None
File sizeLargerSmaller
CompatibilityExcel, Sheets, NumbersUniversal

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

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.

Common Mistakes & Pro Tips

  • Excel silently coerces strings into dates and numbersValues like 03/04 are interpreted as a date, and a string of digits becomes a number that may lose leading zeros (007 becomes 7) or switch to scientific notation past 15 digits. A good converter writes such fields as explicit text cells, but if yours doesn't, format the JSON value with a leading apostrophe or set the column type before importing to preserve the exact string.
  • Excel's 15-significant-digit limit truncates large integersExcel stores numbers as IEEE 754 doubles, so any integer longer than 15 significant digits — such as a 64-bit ID, a credit-card number, or a Twitter/X snowflake ID — loses its trailing digits silently (e.g. 1234567890123456789 may become 1234567890123450000). Keep these as text strings in your JSON so they survive the round trip unchanged.
  • One sheet, flat columns: nested data needs flattening firstAn .xlsx worksheet is a flat grid, so nested objects and arrays must be flattened (dot-notation columns like contact.email) or serialized into a single cell. Arrays of objects map naturally to rows and columns; deeply nested or ragged JSON does not. Decide on a flattening strategy before converting so columns line up across all records.
  • A real .xlsx is a zipped XML package, not a CSV with a different nameGenuine .xlsx files are ZIP archives of XML parts (the Open Packaging Convention), which is why they preserve cell types, multiple sheets, and formatting that CSV cannot. Renaming a .csv to .xlsx does not create a valid workbook and Excel will warn about a corrupt or mismatched format. Use a converter that emits the actual spreadsheet binary.
  • Leading +, =, -, or @ can trigger formula injectionIf a cell value starts with =, +, -, or @, Excel may treat it as a formula, which is both a display bug and a CSV-injection security risk when the data is untrusted. Safe converters prefix such values with a quote or write them as text. Be cautious importing user-supplied JSON that contains strings like =cmd|... into a spreadsheet.

Frequently Asked Questions

How do I turn a JSON array into an Excel spreadsheet?

Provide a JSON array of objects; each object becomes a row and each key becomes a column header in the first row. The tool generates a real .xlsx workbook you can download and open directly in Excel, Google Sheets, or LibreOffice Calc. Nested values are flattened or stringified depending on the converter's settings.

Why does Excel change my IDs, ZIP codes, or phone numbers?

Excel auto-detects cell types and treats digit strings as numbers, which strips leading zeros and rounds integers beyond 15 significant digits. The fix is to store these fields as text rather than numeric values so Excel keeps them verbatim. Many converters offer a text-mode or you can format the source JSON values as strings to force text cells.

Can the converter create multiple sheets from one JSON object?

It depends on the tool, but a common pattern is to map each top-level key whose value is an array of objects to its own worksheet. For example {"users":[...],"orders":[...]} can become a workbook with a users sheet and an orders sheet. If multi-sheet output isn't supported, convert each array separately.

What is the difference between converting JSON to CSV versus to Excel?

CSV is plain text with no concept of data types, formulas, multiple sheets, or formatting, while .xlsx is a structured binary that preserves explicit text-vs-number typing and can hold several sheets. Converting straight to .xlsx avoids Excel's CSV auto-formatting surprises because cell types are set in the file itself. Choose CSV for maximum portability and .xlsx when you want type fidelity inside Excel.

How are nested objects and arrays represented in the spreadsheet?

Since a worksheet is a flat grid, nested objects are usually flattened into dot-notation columns (such as address.city) and nested arrays are either joined into a single cell or serialized as JSON text. There is no automatic expansion of a nested array into extra rows. If you need that, denormalize the JSON into a flat array of objects before converting.

Does generating the Excel file send my data anywhere?

No, the .xlsx file is built in your browser and the download is produced locally, so your JSON is never transmitted to a server. This keeps confidential datasets private even on a shared or corporate network. The generated file exists only on your device unless you choose to share it.