Skip to content
Utilboxes

How to open a JSON file in Excel

Two ways to get JSON data into a spreadsheet: Excel's Power Query import, or converting to CSV first. How nested data is flattened and how to avoid broken numbers.

Updated

Tools for this job: JSON to CSV · JSON Formatter · JSON Validator

Data exports from apps, APIs and online services often arrive as JSON. Double-click the file and you get a wall of brackets in a text editor, not a table. Spreadsheets work in rows and columns, so the data has to be flattened first, either by Excel itself or by converting it to CSV.

Option 1: import with Excel

Excel for Microsoft 365 on Windows can read JSON directly through Power Query: Data → Get Data → From File → From JSON. This is powerful and can be refreshed when the file changes, but not every version of Excel has it.

  1. On the Data tab, choose Get Data → From File → From JSON, pick the file and click Import.
  2. The Power Query editor opens. If it shows a List, click To Table on the Transform tab, then OK.
  3. Click the expand button (two arrows) in the column header, tick the fields you want and click OK.
  4. Repeat for any column that still says Record or List, which holds nested data.
  5. Choose Home → Close & Load. The data lands in a new sheet as a table.

If the file is a single object rather than a list, the editor shows a Record instead: use Into Table first, then expand as above.

Option 2: convert to CSV first

  1. Paste the JSON into JSON to CSV. It expects an array of objects, or an object that contains one.
  2. Choose how to handle nested arrays: separate columns (tags.0, tags.1), joined into one cell, or kept as JSON text in one cell.
  3. Choose the delimiter. Use a semicolon if your Excel uses commas as decimal separators, as in much of Europe.
  4. Keep the header row on, check the preview, and download the CSV.

Nested objects become dotted column names, such as address.city. The tool warns when some records are missing fields, so empty cells do not surprise you later. The conversion runs in your browser, which matters for customer data.

If the JSON will not convert

Exports are sometimes truncated or contain errors. Paste the file into the JSON Validator first; it shows the exact line and a plain-English explanation. The guide to fixing invalid JSON covers the common causes. Very large exports may contain one JSON object per line (often called JSON Lines); those need wrapping into an array before conversion.

Opening the CSV without breaking the data

Double-clicking a CSV lets Excel guess each column's type, and it guesses wrong in predictable ways:

  • Leading zeros vanish: postcodes, phone numbers and IDs like 00042 become 42.
  • Long numbers turn into scientific notation and lose digits after the fifteenth.
  • Text that looks like a date becomes a date, such as gene names or product codes like MAR1.
  • Accented characters garble if Excel reads a UTF-8 file in another encoding.

Instead, use Data → From Text/CSV, choose UTF-8 as the file origin, and set ID and code columns to Text before loading.

Spreadsheet safety

A value beginning with =, +, - or @ can be treated as a formula when a CSV is opened in a spreadsheet, which attackers can abuse. If the data came from users or the internet, turn on “Protect against formula injection” in JSON to CSV, which prefixes those values so they are shown as text.

Just want to read it?

If you only need to look at the data, the JSON Formatter indents it so the structure is readable, without converting anything.

Tools used in this guide

More tools for this job

All guides