ToolActToolAct

Excel to JSON Converter

Upload an Excel file to convert spreadsheet data to JSON format

Drop Excel file here, or click to select

What is Excel to JSON?

Excel to JSON is an online data format conversion tool that converts Microsoft Excel (.xlsx/.xls) spreadsheet data into JSON (JavaScript Object Notation) format.

Excel is the world's most popular spreadsheet software, widely used for data storage, analysis, and reporting. JSON is the most commonly used data exchange format in modern web applications and APIs, known for its clear structure and easy parsing.

With this tool, you can quickly convert Excel spreadsheet data into JSON arrays for use in programming, data analysis, and web development. All processing is done locally in your browser, ensuring data security.

How to Use

How to use

  1. Click the upload area or drag and drop an Excel file (supports .xlsx and .xls formats)
  2. If there are multiple sheets, select the one to convert from the dropdown menu
  3. Choose whether to use the first row as JSON object field names
  4. The formatted JSON data will be generated automatically, ready to copy

Spreadsheet Notes

  • Check the selected sheet, header row, merged cells, empty rows, and date formats before using the JSON.
  • Spreadsheets often mix display formatting with raw values, so verify numbers and dates after conversion.

Use Cases

Turn a workbook sheet into JSON for developmentBring in an .xlsx or .xls workbook, choose the worksheet, and convert that sheet into highlighted JSON for mocks, seed data, dropdown options, localization drafts, or API examples. The workbook is read and parsed entirely in the browser via the SheetJS library, so customer, HR, or internal finance sheets never leave the device during conversion.
Control whether the first row becomes object keysToggle first-row-as-header to switch between an array of objects keyed by column name and an array-style export indexed by column position, then use row and field counts to catch unexpected blank columns or wrong sheet selection. This works well as a controlled intermediate step before pasting the output into your real destination.
Keep spreadsheet parsing local for small data tasksThe page reads the workbook in the browser with SheetJS and copies the output directly. It is best for reviewable sheets, not huge files, formula recalculation, macros, pivot caches, or protected workbook logic. Run a quick sanity check in the destination system before treating the JSON as authoritative.
Spot formula values versus stored stringsSheetJS returns the last cached value of a formula in the browser, so a column full of computed totals shows up as plain numbers in JSON, and cells with stale caches can disagree with what Excel currently displays. Run a quick scan for unexpected zeros or matched strings before treating the export as authoritative, and re-save the workbook if formulas were added after the last save.
Check the header row before the schema breaksWhen first-row-as-header is on, duplicate or blank column names produce invalid JSON keys and some keys may be auto-renamed. Open the JSON, search for 'undefined' or numeric suffixes, and clean the source sheet when keys must stay stable across re-imports, especially for TypeScript interfaces or GraphQL schema generation downstream.

Technical Principle

Modern .xlsx workbooks are SpreadsheetML files defined by ECMA-376 / ISO/IEC 29500 (the Office Open XML standard): the .xlsx extension is a ZIP container whose entries are XML documents under xl/worksheets/sheetN.xml, with strings stored in a shared-string table xl/sharedStrings.xml and cell types declared by the t attribute (s = sharedString, n = number, b = boolean, str = inline string, d = date in ISO 8601). The page reads the uploaded File with FileReader.readAsArrayBuffer, then hands the ArrayBuffer to SheetJS (xlsx). XLSX.read(buffer, {type: 'array'}) returns a workbook object whose SheetNames array drives the sheet selector, and XLSX.utils.sheet_to_json(sheet, options) walks the cell grid to produce either an array-of-objects (with the header row as keys) or an array-of-arrays when header: 1 is passed. Legacy .xls is the binary BIFF8 format (Excel 97-2003), which SheetJS also decodes through the same read() entry point but with type: 'binary' for FileReader.readAsBinaryString or 'array' when reading as bytes. Cell date values in both formats are stored as serial numbers (days since the 1900 epoch in Excel, with the historical 1900-02-29 leap-year bug that shifts dates before 1900-03-01 by one day, or days since 1904-01-01 when the workbook's date1904 flag is set on Excel for Mac). Conversion to a JavaScript Date is (serial - 25569) * 86400 * 1000 milliseconds after Unix epoch for the 1900 system once the leap-year bug is accounted for. Formulas live in the f attribute and SheetJS reports their last cached result in v; if the workbook was saved by a tool that did not recalculate (e.g. some scripted exports), v can be missing or stale. When the first row is used as headers, duplicate or empty header cells force SheetJS to either skip or auto-rename keys (e.g. __EMPTY, __EMPTY_1), which breaks downstream JSON contracts. Merged-cell ranges (declared in worksheet/mergeCells) expose the value only at the top-left anchor and emit undefined in the merged tail cells, so a merged title row produces one populated record followed by N - 1 sparse ones. For workbooks above tens of megabytes, the synchronous XLSX.read() path can block the UI thread; the streaming alternative is to move parsing into a Web Worker so the main thread stays responsive.

  • .xlsx is a ZIP container of XML (ECMA-376 / ISO/IEC 29500); .xls is the binary BIFF8 format; SheetJS XLSX.read(buffer, {type: 'array'}) handles both via FileReader.readAsArrayBuffer.
  • sheet_to_json options: header: 1 returns array-of-arrays; header: 'A' uses spreadsheet column letters; defval: null fills sparse cells with null instead of dropping the key; raw: false applies Excel display formatting.
  • Excel date serial is days since 1900-01-01 (with the 1900-02-29 leap-year bug; for the Mac 1904 date system, days since 1904-01-01); JS Date ms = (serial - 25569) * 86400000 after Unix epoch.
  • Duplicate or empty header cells become auto-renamed keys (__EMPTY, __EMPTY_1) or collide silently; validate the JSON for these strings before relying on the schema.
  • Merged-cell ranges (worksheet.mergeCells) expose the value only at the top-left anchor; tail cells in the merge are undefined, so a merged title row yields one record with the value and N-1 records with empty fields.
  • Formula cells store the expression in f and the last cached result in v; tools that save without recalculating leave v stale or missing, and SheetJS returns v as-is.
  • Move XLSX.read into a Web Worker for workbooks above ~10 MB; the synchronous parse path blocks requestAnimationFrame and can freeze the tab for several seconds on large sheets.

Examples

Employee sheet to JSON object array

Excel rows (sheet Staff):
id | name    | dept       | salary
1  | Alice   | Engineering| 8500
2  | Bob     | Sales      | 6200

JSON output:
[
  { "id": 1, "name": "Alice", "dept": "Engineering", "salary": 8500 },
  { "id": 2, "name": "Bob",   "dept": "Sales",       "salary": 6200 }
]

Multi-sheet workbook (orders.xlsx)

Workbook sheets: ["Customers", "Orders", "Products"]
Select sheet: Orders
First row used as headers: order_id, customer_id, total, date

Result: 1,284 rows converted into JSON objects
Empty trailing cells become null, not empty string

Excel date cell to ISO 8601 string

Cell A2 (formatted as Date in Excel): 46173  (Excel serial number)
Displayed in Excel: 2026-06-01

JSON output:
{ "order_date": "2026-06-01T00:00:00.000Z" }

Note: Excel stores dates as numeric serials; this tool normalizes them to ISO strings

Headers with spaces and Chinese characters

Header row: "Order No." | "客户姓名" | "金额 (USD)"

JSON keys are preserved verbatim:
{
  "Order No.": "A-1024",
  "客户姓名": "王小明",
  "金额 (USD)": 199.50
}

FAQ

Is my Excel file uploaded?

No. The .xlsx, .xls, or .csv file is parsed in your browser using SheetJS. Bytes never leave your device. You can confirm by checking the Network tab while you load a file.

Which Excel features survive the conversion?

Cell values, dates (as ISO strings or Excel serial numbers depending on the option), numbers, booleans, and text. Charts, images, conditional formatting, formulas (the cached value is kept, not the formula), comments, and merged cells are dropped or simplified.

Are all sheets converted?

Only the selected sheet is converted. Use the sheet dropdown to pick which sheet to export. If you need multiple sheets, convert them one at a time.

How are headers and rows mapped to JSON?

If 'first row as header' is on, the result is an array of objects with header cells as keys. Off → an array of arrays of cell values. Empty cells become null in the output.

How are dates handled?

Excel stores dates as serial numbers (days since 1900). The page converts them to ISO 8601 strings (2026-06-13) by default. Switch to 'raw' to keep the serial number, useful when re-importing into Excel later. Time-only cells become strings like 'T14:30:00'.

What about formulas?

Formulas are not evaluated; only the cached calculated value (last saved by Excel) is used. If you need fresh formula results, open the file in Excel, recalculate (F9), save, then upload again.

What's the file size limit?

Browser memory caps it. Modern desktops handle workbooks up to a few hundred MB. For very large files (> 1 M rows), use a desktop scripting tool (Python pandas, Excel Power Query) instead - the browser will run out of memory.