How to Merge Multiple JSON Files Into a Single Excel File
- Browser method: manually merge JSON arrays before converting
- Python approach to merge multiple files into one Excel workbook
- How to put each JSON file on a separate sheet vs merging into one sheet
- Handling files with different keys when merging
Table of Contents
The browser converter handles one JSON array at a time — but merging multiple files into one Excel workbook is straightforward with either a manual array join or a short Python script. Here are both approaches depending on your situation.
Merge JSON Arrays in the Browser Before Converting
If you have a small number of files (2-5) with the same structure, the fastest approach is to manually combine them into one array:
- Open a text editor (Notepad, VS Code, or the browser console)
- Paste your first JSON array, remove the closing
] - Add a comma, then paste the content of the next array (without its opening
[) - Close with
]
Example — combining two files:
// file1.json
[{"id":1,"name":"Alice"},{"id":2,"name":"Bob"}]
// file2.json
[{"id":3,"name":"Carol"},{"id":4,"name":"Dave"}]
// Combined
[
{"id":1,"name":"Alice"},
{"id":2,"name":"Bob"},
{"id":3,"name":"Carol"},
{"id":4,"name":"Dave"}
]
Paste the combined array into the converter above and download the result.
Python: Merge Multiple JSON Files Into One Excel Sheet
import json
import glob
import pandas as pd
# Read all JSON files in a folder
all_data = []
for filepath in glob.glob('data/*.json'):
with open(filepath, 'r') as f:
data = json.load(f)
# Handle both list and single-object files
if isinstance(data, list):
all_data.extend(data)
else:
all_data.append(data)
# Convert to DataFrame and export
df = pd.DataFrame(all_data)
df.to_excel('merged_output.xlsx', index=False)
print(f'Exported {len(df)} rows from {len(all_data)} records')
Install dependencies: pip install pandas openpyxl
This flattens all records into one sheet. If files have different keys, pandas fills missing values with NaN (blank cells in Excel).
Sell Custom Apparel — We Handle Printing & Free ShippingPython: Put Each JSON File on a Separate Excel Sheet
import json
import glob
import os
import pandas as pd
output_path = 'multi_sheet_output.xlsx'
with pd.ExcelWriter(output_path, engine='openpyxl') as writer:
for filepath in glob.glob('data/*.json'):
with open(filepath, 'r') as f:
data = json.load(f)
df = pd.DataFrame(data if isinstance(data, list) else [data])
# Use filename (without extension) as sheet name
sheet_name = os.path.splitext(os.path.basename(filepath))[0]
# Excel sheet names max 31 chars
sheet_name = sheet_name[:31]
df.to_excel(writer, sheet_name=sheet_name, index=False)
print(f'Created {output_path} with one sheet per file')
What Happens When Files Have Different Keys
When merging JSON files that have different fields, you have two options:
Option 1 — Union columns (pandas default): All columns from all files appear in the output. Files missing a field get a blank cell in that column. This is what the Python script above does automatically via pd.DataFrame(all_data).
Option 2 — Common columns only: Only keep columns that appear in all files.
# Find common keys across all files
common_keys = None
for item in all_data:
keys = set(item.keys())
common_keys = keys if common_keys is None else common_keys & keys
# Filter to common keys only
filtered = [{k: v for k, v in item.items() if k in common_keys} for item in all_data]
df = pd.DataFrame(filtered)
For most use cases, Option 1 (union) is more useful — you see all available data and can identify which records have missing fields by looking for blank cells.
Convert a Single JSON File Right Now
For one file at a time — paste your JSON array above and download an Excel file instantly. No install required.
Open Free JSON to Excel ConverterFrequently Asked Questions
Can the browser converter handle multiple JSON files?
The browser converter accepts one JSON array at a time. To merge multiple files, combine them into a single array first (as shown in the browser method above), then paste the combined array.
What is the fastest way to merge 100+ JSON files to Excel?
Use the Python glob approach — it reads all matching files in a folder automatically. On a modern machine, 100 files with a few thousand records each converts in seconds.
How do I merge JSON files from different API endpoints?
Fetch each endpoint, store the responses as JSON files or in memory, then combine the arrays and convert. The Python script works with in-memory data too — just build the all_data list by appending API responses directly instead of reading files.

