How to Convert Excel to JSON: Sheets, Dates & Output Shapes Explained
Convert Excel (.xlsx) to JSON the right way — handle multiple sheets, get real dates instead of serial numbers, and pick the output shape. Online, in Python, and in Node.
Spreadsheets are where data lives; JSON is where APIs and code want it. Converting Excel to JSON is a daily task, and the parts that trip people up are always the same: multiple sheets, dates that arrive as mysterious numbers, and choosing the right JSON shape. This guide covers all three — online in one click, in Python, and in Node.
The quickest way: convert Excel to JSON online
For a one-off conversion, use a browser tool. Drag your .xlsx file onto the Excel to JSON converter, pick a sheet and output shape, and copy or download the JSON. The first row becomes your keys and each following row becomes an object.
The important question is where the conversion happens. Server-based tools (aspose, conversiontools, and similar) upload your workbook — a problem for financial or customer data. Prefer a client-side tool (ours reads the file in your browser using the platform’s built-in decompression), which also means there’s no file-size cap.
Use it when: you want a fast, private conversion on any device with no install.
Handle multiple worksheets
An .xlsx is a workbook, not a single table — it can have a Summary tab, a Data tab, and more. A good converter lists every sheet and lets you choose which to convert; some can emit an object keyed by sheet name to capture them all at once. Always check which sheet you’re exporting before trusting the output — converting the wrong tab is the most common mistake.
Get dates right (not serial numbers)
This is the classic Excel-to-JSON gotcha. Internally, Excel stores a date as a serial number — the count of days since 1899-12-30. So 2024-01-15 is really stored as 45306. A naive converter hands you:
{ "joined": 45306 }
which is useless downstream. Proper conversion reads the workbook’s style table, sees that the cell is date-formatted, and converts the serial number to an ISO date:
{ "joined": "2024-01-15" }
Our converter does this automatically. If you ever see large meaningless integers where dates should be, that’s the serial-number bug — switch to a tool that reads cell formats.
Choose the output shape
The same sheet can become three valid JSON structures — pick the one your code consumes:
- Array of objects — one object per row, keyed by the header. What most REST APIs and JavaScript expect.
- 2D array — the raw grid as an array of arrays. Compact; good for tables and charts.
- Keyed by column — each header maps to an array of its column’s values. Maps directly onto a pandas DataFrame.
Having all three a dropdown away saves you from reshaping the result by hand.
Convert Excel to JSON in Python
For pipelines, pandas reads .xlsx directly (with the openpyxl engine installed):
import pandas as pd
df = pd.read_excel("data.xlsx", sheet_name="Sheet1")
df.to_json("data.json", orient="records", date_format="iso", indent=2)
orient="records" gives array-of-objects; orient="columns" gives the column-keyed shape; orient="values" gives a 2D array. date_format="iso" keeps dates readable. Use sheet_name=None to read every sheet into a dict of DataFrames.
Convert Excel to JSON in Node.js
In Node, a spreadsheet library parses the binary format:
import * as XLSX from "xlsx";
const wb = XLSX.readFile("data.xlsx", { cellDates: true });
const sheet = wb.Sheets[wb.SheetNames[0]];
const rows = XLSX.utils.sheet_to_json(sheet); // array of objects
Pass cellDates: true so dates come back as real Date values rather than serial numbers.
Which method should you use?
For a quick, private conversion — especially when you want to pick a sheet or output shape without installing anything — use the online Excel to JSON converter: drop the file, choose, and download. Use Python/pandas when it’s part of a pipeline, and a Node library inside a JavaScript service. Whatever you choose, confirm the sheet, demand real dates, and pick the JSON shape your code needs.
Need the reverse? See how to convert JSON to Excel. Working with text formats? Read how to convert CSV to JSON, and explore output with the JSON viewer.
Ready to merge your JSON?
Combine files or snippets in your browser — free and private.
Open the merge toolKeep reading