Turning JSON into an Excel spreadsheet is one of the most common data tasks — developers do it to share API responses with non-technical teammates, and analysts do it to run pivot tables. This guide covers three reliable methods, plus how to handle nested data.

How the conversion works

When JSON becomes a spreadsheet, each key becomes a column header and each object becomes a row:

[
  {"name": "Alice", "age": 30},
  {"name": "Bob", "age": 25}
]

...becomes a two-column sheet with headers name and age and two data rows. Unlike CSV, Excel keeps data types: numbers stay numeric and sortable, booleans become usable values, and strings stay text.

Method 1: Online converter (fastest)

The quickest way needs no code and no install. Paste your JSON into an online converter and download the XLSX. The best ones run entirely in your browser, so sensitive data never gets uploaded to a server.

Convert JSON to Excel instantly

Paste JSON or upload a file and download a ready-to-use .xlsx in seconds. Handles nested objects and arrays. Runs in your browser — your data stays private.

Open tool →

Method 2: JavaScript with SheetJS

For automation in a Node.js or browser app, the SheetJS (xlsx) library is the standard:

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");

Method 3: Python with pandas

For data pipelines and analysis, pandas is the cleanest option:

import pandas as pd
import json

data = json.loads('[{"name": "Alice", "age": 30}]')
df = pd.DataFrame(data)
df.to_excel("output.xlsx", index=False)

You will need openpyxl installed (pip install openpyxl) for pandas to write XLSX files.

Handling nested JSON

Real-world JSON is rarely flat. A nested object like {"user": {"city": "Berlin"}} needs flattening, or it ends up as an unreadable blob in one cell. The standard approach is dot-notation: the nested key becomes a column named user.city.

# pandas: flatten nested JSON before export
df = pd.json_normalize(data)
df.to_excel("output.xlsx", index=False)

Good online converters do this automatically — look for a "flatten nested objects" option.

XLSX vs CSV: which to choose?

  • XLSX — keeps data types, supports formulas, multiple sheets, and formatting. Best when humans will work in Excel.
  • CSV — smaller, universally compatible, treats everything as text. Best for data pipelines and re-importing elsewhere.

Common pitfalls

  • Single object instead of an array: wrap it in [ ] so it becomes one row.
  • Inconsistent keys across objects: missing keys become empty cells — that is expected.
  • Very large files (10,000+ rows): browser tools may slow down; use a library for huge datasets.