How to Open and Import a JSON File in Excel (Power Query, API URL or Converter)
By the DataSwitch Pro team · · Updated · 6 min read
Quick answer
Excel does not open .json files as a table when you double-click them. To import JSON into Excel for Microsoft 365 or Excel 2016 and later on Windows, use Data → Get Data → From File → From JSON, convert the list To Table in Power Query, expand the columns and click Close & Load. For JSON from an API, use Get Data → From Other Sources → From Web and set the query to refresh automatically. Without Power Query, convert the file to a workbook first with a JSON to Excel converter and open the resulting .xlsx.
An API export, a database dump or a log file arrives as JSON, and someone needs to filter it in a spreadsheet. Excel can do it, but not by double-clicking the file — that opens it as one long line of text, or in Notepad. There are two dependable routes.
Method 1: Power Query (built into Excel)
Power Query is Excel's import engine. It is included in Excel for Microsoft 365 and Excel 2016 and later on Windows; on a Mac, availability depends on your Excel version.
- Open a blank workbook and go to Data → Get Data → From File → From JSON.
- Select the file. The Power Query editor opens and usually shows a single List.
- Click To Table in the ribbon and accept the defaults.
- Click the expand icon (two arrows) in the column header, untick Use original column name as prefix if you want short names, and click OK.
- If some columns still show Record or List, expand them the same way.
- Click Close & Load. The data appears as an Excel table.
The import is saved as a query, so when the JSON file is replaced with a newer version, Data → Refresh All reloads it without repeating the steps.
If Excel is set to another language, the path is the same: the Data tab, then Get Data, From File and From JSON. In Spanish it reads Datos → Obtener datos → Desde un archivo → Desde JSON, and in German Daten → Daten abrufen → Aus Datei → Aus JSON.
Import JSON from a URL or API, and refresh it automatically
When the JSON comes from a web address rather than a file, for example a REST API or an export link, Excel can load it directly and keep it up to date:
- Go to Data → Get Data → From Other Sources → From Web.
- Paste the URL that returns the JSON and click OK. If the API needs a key in a header, choose Advanced and add it under HTTP request header parameters.
- Power Query recognises the JSON. Convert it To Table and expand the columns exactly as in Method 1, then click Close & Load.
- To refresh it automatically, open Data → Queries & Connections, right-click the query and choose Properties. Tick Refresh every … minutes and/or Refresh data when opening the file.
The workbook then pulls fresh data on its own, which is the usual way to build a small dashboard on top of an API without code.
Method 2: Convert JSON to .xlsx first
When Power Query is not available, or you need the result quickly, convert the file into a workbook:
- Open the JSON to Excel converter and paste the JSON or drop the file.
- Keep Flatten nested JSON on so nested objects become separate columns.
- Download the
.xlsxfile and open it in Excel, LibreOffice or Google Sheets.
This route also works for colleagues who only have Excel Online or an older version, because the result is an ordinary workbook.
Which JSON shapes open cleanly
Spreadsheets are grids, so the closer the JSON is to a list of similar records, the better it converts.
Ideal: an array of flat objects
[
{ "id": 1, "name": "Amina", "city": "Fes" },
{ "id": 2, "name": "Tom", "city": "Lyon" }
]
Common variations and how they end up in a sheet:
- The array is inside a wrapper, for example
{"data": [ ... ]}. In Power Query, click on the List next todatabefore converting to a table. A converter usually detects the main array for you. - Nested objects such as
"address": {"city": "Fes"}become columns likeaddress.city. - Arrays inside records, such as a list of order items, cannot fit in one cell as data. Either keep them as JSON text in one column, or expand them to new rows — Power Query's Expand to New Rows does this, repeating the parent fields on each row. See how to flatten nested JSON for the trade-offs.
- JSON Lines (one object per line,
.jsonl) is not a single JSON document. Power Query's JSON import fails on it; convert it with JSONL to JSON first.
Troubleshooting
- “We couldn't parse the input provided as a JSON value”. The file is not valid JSON. Paste it into a JSON validator to find the line with the error — often a trailing comma or a truncated download.
- Numbers or dates are text. In Power Query, select the column and set its type (Transform → Data Type) before loading.
- Long IDs show as 1.23E+15. Set those columns to Text in Power Query; Excel keeps only 15 significant digits for numbers.
- Accented characters are wrong. JSON is UTF-8 by definition; if the file was saved in another encoding, re-save it as UTF-8 in a text editor.
Going the other way
If you edit the data in Excel and need it back as JSON, export the sheet with Excel to JSON. For a lighter result that opens anywhere, JSON to CSV is another option, but CSV has no sheets, types or formatting.
Try it on your own file. Free, private, and processed in your browser.
Frequently asked questions
How do I import JSON data into Excel automatically?
Load it with Power Query (From JSON for a file, From Web for a URL), then open the query's Properties and turn on Refresh every … minutes or Refresh data when opening the file. Excel re-reads the source on that schedule.
Can Excel import JSON from an API URL?
Yes. Data → Get Data → From Other Sources → From Web accepts a URL that returns JSON. Keys or tokens that the API expects in a header can be added under Advanced.
Why does my JSON file open in Notepad instead of Excel?
Windows associates .json with a text editor. Excel only reads JSON through Power Query's import, not by opening the file directly.
Can Google Sheets open JSON files?
Not natively. Convert the JSON to .xlsx or CSV first, then import that file into Google Sheets.
What is the size limit?
An Excel sheet holds up to 1,048,576 rows and 16,384 columns. Larger JSON files need to be filtered or split before loading.
Will the JSON keep updating in Excel?
With Power Query, yes: the import is saved as a query and Refresh All re-reads the file. A converted .xlsx is a one-time snapshot.