Home › Blog

How to open a JSON file in Excel

Excel cannot open a .json file the way it opens a .csv. It imports JSON through Power Query instead, and you shape the data into a table before it lands on a sheet. Here are the steps, and a shorter way when you only need the file once.

Import JSON with Power Query

The steps below are from Excel for Microsoft 365 on Windows. Power Query is built into that version under the Data tab, where Microsoft also calls it Get & Transform.

  1. Open a blank workbook and go to Data › Get Data › From File › From JSON.
  2. Pick your .json file and click Import. The Power Query Editor opens.
  3. If the file is an array, the editor shows a single List with one Record per item. Click To Table on the ribbon and confirm with OK. You now have one column, Column1, full of records.
  4. Click the expand button (two arrows) in the Column1 header, tick the fields you want, untick Use original column name as prefix if you want short headers, and click OK.
  5. Columns that still show Record are nested objects. Expand them the same way. Columns that show List are arrays: choose Expand to New Rows for one row per item, or Extract Values to join the items into one cell.
  6. Click Home › Close & Load. Excel writes the result to a new sheet as a table.

Many API exports wrap the array in an object, for example {"page": 1, "data": [...]}. Power Query then opens a Record instead of a list. Click the List link next to data to drill into the array, and carry on from step 3.

The query remembers the file path. When the JSON file changes, Data › Refresh All reads it again and rebuilds the table, which is the main reason to use Power Query for a file you get every week.

The quicker way: convert the file to .xlsx first

For a file you only need to look at once, expanding columns by hand is slow. The JSON to Excel converter on this site does the flattening in one step:

  1. Upload the .json file or paste its contents.
  2. Check the preview table. Each object in the array is one row.
  3. Click Download .xlsx and open the file in Excel, LibreOffice Calc or Google Sheets.

Nested objects become dotted columns, so {"shipping": {"city": "Berlin"}} lands in a shipping.city column. Arrays inside an object go into one cell as JSON text, for example ["keyboard","mouse"]. The file is built in your browser and is not uploaded anywhere.

If you need one row per array item instead, Power Query's Expand to New Rows is the better fit. The nested JSON guide compares both layouts.

Which one to use

  • Power Query when the same JSON file comes back with new data and you want to refresh.
  • Power Query when arrays should become extra rows.
  • The converter for a one-off look at a file, or when your Excel has no From JSON entry.
  • The converter when the data should not pass through any online service: it runs locally in the page.

If Excel shows an error on import, the file may not be valid JSON. Paste it into the converter: it prints the parser's message, which usually points at a trailing comma or a missing quote.