Skip to content

How to convert JSON to Excel

Turn JSON into a spreadsheet with an online converter, Excel's own Power Query, a CSV file or a few lines of Python, and handle nested data properly.

Guide5 min readUpdated

A spreadsheet is a table, so JSON converts best when it's a list of similar records: an array of objects. Each object becomes a row and each key a column. Nested objects are flattened into columns like address.city.

[
  { "id": 1, "name": "Ann", "address": { "city": "Paris" } },
  { "id": 2, "name": "Bob", "address": { "city": "Rome" } }
]
JSON
id | name | address.city
1  | Ann  | Paris
2  | Bob  | Rome
Resulting sheet

1. With an online converter (fastest)

Paste your JSON into the JSON to Excel converter, check the preview and download the .xlsx file. It creates a real Excel workbook rather than a CSV, so:

  • numbers, true/false and ISO dates (like 2024-01-05) stay real numbers, booleans and dates;
  • the header row is bold, frozen and has filters, and columns are sized to fit;
  • nested objects become dot-path columns, and arrays can be kept as JSON, joined, or split into one column each;
  • an object holding several arrays can become one sheet per array;
  • text is never run as a formula, so a value like =SUM(A1) is safe.

The file is built in your browser, so the data isn't uploaded anywhere.

2. In Excel with Power Query

Desktop Excel (Microsoft 365 and recent versions) can import JSON itself:

  1. Go to Data → Get Data → From File → From JSON and pick your file.
  2. In the Power Query editor you'll see a List. Click To Table, then OK.
  3. Click the expand icon (two arrows) in the column header, choose the fields you want, and repeat for nested columns.
  4. Click Close & Load.

It's worth it when the same JSON file is refreshed regularly, because Power Query remembers the steps. For a one-off conversion, the online converter is quicker.

3. Via CSV (for Google Sheets and other tools)

Google Sheets can't import JSON directly, but it imports CSV. Convert with the JSON to CSV converter, then use File → Import in Sheets. If you open a CSV in Excel instead, watch out for three things:

  • Accented characters look wrong: enable “BOM for Excel” in the converter's options, which tells Excel the file is UTF-8.
  • Leading zeros disappear from IDs and ZIP codes, because Excel reads them as numbers.
  • Long numbers such as card or order numbers turn into scientific notation and lose digits after 15.

Converting straight to XLSX avoids all three.

4. With Python and pandas

For scripts and automation, pandas flattens nested JSON and writes Excel in a few lines (it needs the openpyxl package):

import json
import pandas as pd

with open("data.json") as f:
    data = json.load(f)

df = pd.json_normalize(data)          # nested keys become address.city
df.to_excel("data.xlsx", index=False)  # pip install pandas openpyxl

Handling nested data and arrays

Tables are flat, so nested JSON needs a decision:

  • Nested objects are flattened into columns: {"address": {"city": "Paris"}} becomes an address.city column.
  • Arrays of values such as tags can be joined into one cell (a, b), split into tags.0, tags.1 columns, or kept as JSON text.
  • Arrays of objects (like orders inside each customer) are usually better as their own sheet.

Not sure what your data looks like? Open it in the Table Viewer first to see the rows and columns before you convert.

Frequently asked questions

What JSON shape converts best?

An array of objects, where each object is one row and its keys are the columns. If your data is an object that contains such an array (for example {"users": [...]}), convert that array.

Should I use Excel (XLSX) or CSV?

XLSX keeps numbers, dates and true/false as real types and opens the same way everywhere. CSV is plain text, works with every tool, but Excel may re-interpret it: it can strip leading zeros, turn long numbers into scientific notation or garble accented characters.

Is there a size limit?

An Excel sheet holds up to 1,048,576 rows and 16,384 columns, and a cell up to 32,767 characters. Larger data should go to CSV or a database instead.

Tools used in this guide

More guides