How to Open a JSON File in Excel : From Messy Data to Clean Excel
By Rohan Vats
Updated on Nov 10, 2025 | 17 min read | 101.29K+ views
Share:
For working professionals
For fresh graduates
More
By Rohan Vats
Updated on Nov 10, 2025 | 17 min read | 101.29K+ views
Share:
Table of Contents
| Did You Know? Modern browsers (like Chrome and Firefox) automatically format and display .json files in a readable tree structure, making debugging much easier. This helps developers quickly inspect complex nested data without needing external tools or manually formatting the file. |
JSON (JavaScript Object Notation) is a lightweight data format used to store and exchange structured information, especially in APIs and web applications. It organizes data hierarchically using key-value pairs, unlike Excel’s tabular format.
Because of this difference, Excel cannot directly interpret JSON files, often displaying them as unstructured text. To work with JSON data in Excel, you need to import, transform, or convert it into a readable table format.
In this guide, you'll read more about how to open a JSON file in Excel, convert them into CSV, and fix common import issues.
Enhance your data science skills with upGrad’s online data science courses. You’ll find programs to fit your specific analysis needs, whether you’re managing business reports, scientific data, or everyday numbers.
The best and most powerful method for opening JSON files is built directly into modern versions of Excel (Excel 2016, 2019, 2021, and Microsoft 365). It’s called Power Query (or "Get & Transform" in the Data tab).
This tool is specifically designed to import and reshape data from many sources, including JSON. It allows you to create a repeatable process that flattens your nested data into a clean, tabular format.
In 2025, professionals who can use data analysis tools to improve business operations will be in high demand. If you're looking to develop relevant data analytics skills, here are some top-rated courses to help you get there:
Power Query will close, and your data will be loaded into a new, perfectly formatted Excel table on your worksheet.
Also Read: Power BI Tutorial: Learn from Experts
This is the preferred solution for how to open a json file in excel in most cases.
CSV (Comma Separated Values) is a format that Excel understands perfectly. A CSV file is already a flat table of rows and columns. By converting your JSON to a CSV first, you bypass Excel's transformation challenges.
This process "flattens" the hierarchical data for you before it even gets to Excel. It's a great workaround if the Power Query steps for how to open json file in excel are failing or seem too complex for your specific file.
You cannot do this conversion in Excel itself. You must use an external tool.
Also Read: 60 Advanced Excel Formulas – A Must Know For All Professionals
For data professionals, developers, or anyone handling large or repetitive JSON imports, using a simple Python script is the most robust solution. The pandas library is legendary for its data-handling capabilities, including its json_normalize function, which is built to flatten complex JSON.
This code assumes you have Python and the pandas library installed (pip install pandas openpyxl).
Python
import pandas as pd
import json
# Define your file names
json_file_name = 'data.json'
excel_file_name = 'output.xlsx'
# Open and load the JSON file
with open(json_file_name, 'r') as f:
data = json.load(f)
# This is the magic command to flatten nested JSON
# If your JSON is a list of objects, it will handle it.
df = pd.json_normalize(data)
# Save the flattened data to an Excel file
# index=False prevents pandas from adding an extra index column
df.to_excel(excel_file_name, index=False)
print(f"Successfully converted {json_file_name} to {excel_file_name}!")
Output (in your console):
Successfully converted data.json to output.xlsx!
This script will create a new Excel file named output.xlsx in the same folder. This file will contain your flattened data, with nested keys automatically turned into new columns (e.g., user.name, user.address.city).
Also Read: Pandas Cheat Sheet in Python for Data Science: Complete List for 2025
This table compares the direct import vs. the conversion method.
| Method | Best For | Tools Used |
| Power Query | Direct import, refreshable data | Excel (built-in) |
| Convert to CSV | Very complex or malformed files | Online converter or Python script |
| Script Method | Large files, automation | Python (pandas) |
Also Read: What Is Data Science? Courses, Basics, Frameworks & Careers
Simply getting the data into Excel is half the battle. Here’s how to open a json file in excel and ensure the data is clean, correct, and ready for analysis.
Garbage in, garbage out. A broken JSON file won't import, no matter what method you use.
Also Read: Data Validation in Excel
If you're stuck, one of these common issues is likely the culprit.
Also Read: How to Become a Data Scientist – Answer in 9 Easy Steps
Your data is loaded. Now make it usable.
Also Read: Excel Worksheet for Practice
What if your JSON isn't a file, but a live URL from an API? Power Query can handle this just as easily.
Who knew that learning how to open a JSON file in Excel could be this simple? With tools like Power Query and manual CSV conversion, converting JSON to Excel is easier than ever. Whether you're working with simple data or complex nested objects, Excel provides the flexibility and features needed to handle all kinds of JSON data effortlessly.
If you’re eager to become an Excel pro, why not take it a step further? upGrad’s exclusive course on Excel goes beyond the basics, equipping you with advanced data management techniques and practical skills that can boost your career opportunities in data analytics, finance, and beyond.
Here are some of the additional upGrad courses (including free ones) to support your Excel learning journey:
For personalized career guidance, contact upGrad’s counselors or visit a nearby upGrad career center. With expert support and an industry-focused curriculum, you'll be prepared to tackle data analysis challenges and advance your career.
Software Development Courses to upskill
Explore Software Development Courses for Career Progression
Excel 2016, 2019, 2021, and Microsoft 365 have native JSON import via Power Query ("Get & Transform"). Excel 2010 and 2013 can also do it, but you must first download and install the free "Power Query" add-in from Microsoft.
The steps are very similar. Modern versions of Excel for Mac include Power Query. Go to the Data tab > Get Data (Power Query) > From File > From JSON. The same Power Query Editor will open, allowing you to expand and load the data.
This is not an error. It's how Power Query shows you a nested object ("Record") or an array ("List"). You must click the "Expand" icon (two diverging arrows) in the column header to see the data inside.
In the Power Query Editor, click the "Expand" icon on the column that contains the array (it will say "List"). In the pop-up, choose "Expand to New Rows." This will duplicate the parent item for each entry in the nested array, creating a flat table.
Your JSON file is likely too large for your computer's memory. Instead of using Power Query, you should use Method 3: Using Python and pandas. This method processes the file on disk and is much more memory-efficient.
Yes. If you used Power Query (Method 1), the connection to the file remains. You can go to the Data tab and click Refresh All to re-import the latest data from the source .json file.
In the Power Query Editor, right-click the column header you want to convert. Go to Change Type and select Date, Time, or Date/Time. Power Query is very good at parsing standard (ISO) date strings.
Yes. This is a key feature of Power Query. Go to Data > Get Data > From Other Sources > From Web. Paste the URL. Excel will fetch the JSON and let you transform it just like a local file.
The best method for very large files (over 100MB) is to pre-process them outside of Excel. Use a Python script with the pandas library (json_normalize and to_excel) to flatten the file before opening it.
Yes. In Power Query, choose Data > Get Data > From File > From Folder. Point it to the folder containing all your JSON files. Power Query will provide a "Combine Files" helper to merge them all into one single table.
After you've loaded your JSON data into a sheet, you can use standard Excel functions like XLOOKUP or VLOOKUP to merge it. For larger datasets, you can use the Merge Queries feature within the Power Query Editor.
Power Query attempts to guess the data types (e.g., number, text, boolean). This is called "Type Detection." It's usually correct, but you should always double-check in the editor and manually change types if needed (e.g., changing a numeric ZIP code to "Text").
You can use a free, trusted online converter tool for small, non-sensitive files. For a more robust or secure method, use a Python script with the pandas library: pd.read_json("file.json").to_csv("file.csv", index=False).
You are most likely using an old version of Excel (2013 or older) and you have not installed the separate "Power Query" add-in. Or, you are on a very old version (like 2007) that does not support it at all.
You can set a schedule. Click on your imported data table, go to the Table Design or Data tab, find Connection Properties. In the dialog, you can check the box to "Refresh every X minutes" or "Refresh data when opening the file."
This is a common annoyance. When you are in the Power Query Editor and click the "Expand" icon, a small dialog box appears. Before you click OK, uncheck the box at the bottom that says "Use original column name as prefix."
Yes, but it's much more complicated than using Power Query. The "Refresh" button in Power Query is the automation. You can, however, record a simple macro that just calls the "Refresh All" command, which you could then tie to a button.
Power Query handles this very well. If one JSON object has a "middle_name" key and the next one doesn't, Power Query will create the "middle_name" column and simply place a null (empty cell) value for the record that didn't have it.
Absolutely. This is a more advanced, cloud-based solution. You can create a Power Automate flow that triggers (e.g., when an email arrives), parses a JSON, and then uses the "Add a row into a table" action to populate an Excel Online file row by row.
Simply save the file as a .xlsx and send it. The data you imported will be saved in the file. However, if you want the recipient to be able to refresh the data, they must also have access to the original .json file in the same file path.
417 articles published
Rohan Vats is a Senior Engineering Manager with over a decade of experience in building scalable frontend architectures and leading high-performing engineering teams. Holding a B.Tech in Computer Scie...
Get Free Consultation
By submitting, I accept the T&C and
Privacy Policy
India’s #1 Tech University
Executive PG Certification in AI-Powered Full Stack Development
77%
seats filled
Top Resources