Excel File to JSON Converter
Convert Excel files (.xls, .xlsx) to JSON instantly in your browser. Drag & drop, preview sheets, copy or download structured JSON output.
About
Excel spreadsheets encode data in opaque binary (BIFF8 for .xls) or compressed XML archives (OOXML for .xlsx). Extracting structured data requires decompressing ZIP containers, resolving shared string tables, mapping cell references like A1 to row-column indices, and interpreting number format codes. A manual copy-paste approach corrupts date serials (Excel stores dates as floats offset from 1900-01-01), drops merged cell values, and silently truncates strings exceeding clipboard limits. This converter parses the full workbook structure client-side. No file leaves your machine. No server processes your data.
The tool handles multi-sheet workbooks, preserving sheet names as JSON keys. It resolves shared string indices, converts Excel date serial numbers to ISO 8601 strings, and correctly interprets boolean and error cells. Output modes include array-of-objects (first row as keys) and array-of-arrays (raw grid). Note: this tool approximates formatting-dependent values. Cells using conditional formatting or formula-driven display may differ from visual appearance. Files with VBA macros are parsed for data only. Macro code is discarded.
Formulas
Excel stores dates as floating-point serial numbers. Converting serial s to a calendar date requires correcting for the Lotus 1-2-3 leap year bug (serial 60 maps to the nonexistent date 1900-02-29):
Where s is the Excel serial number. If s > 60, subtract 1 to compensate for the phantom Feb 29, 1900. The multiplier 86400000 converts days to milliseconds (24 × 60 × 60 × 1000).
Cell reference decoding converts column letters to zero-based indices:
Where n is the number of letters minus 1. Column A = 0, Z = 25, AA = 26, XFD = 16383.
JSON output in "Objects" mode maps header cells to keys. For row r and column c:
Where headers is the array of first-row values, and row indexing starts from the second data row.
Reference Data
| Feature | .xlsx (OOXML) | .xls (BIFF8) |
|---|---|---|
| Format Type | ZIP + XML archive | Binary compound file |
| Max Rows | 1,048,576 | 65,536 |
| Max Columns | 16,384 (XFD) | 256 (IV) |
| Max File Size (practical) | ~50 MB | ~20 MB |
| String Storage | Shared Strings Table (XML) | SST Record (binary) |
| Date Encoding | Serial number (float) | Serial number (float) |
| Date Epoch | 1900-01-00 (with Lotus bug) | 1900-01-00 (with Lotus bug) |
| Number Precision | IEEE 754 double (64-bit) | IEEE 754 double (64-bit) |
| Boolean Cell Value | TRUE → 1, FALSE → 0 | Same |
| Error Cell Values | #DIV/0!, #N/A, #VALUE! | Same |
| Compression | DEFLATE (ZIP) | None (raw binary) |
| Multi-Sheet | Yes (separate XML per sheet) | Yes (BOUNDSHEET records) |
| Formula Cells | Cached result extracted | Cached result extracted |
| Merged Cells | Top-left cell value preserved | Top-left cell value preserved |
| Unicode Support | Full UTF-8 | UTF-16LE |
| Introduced | Office 2007 | Excel 97 |
| MIME Type | application/vnd.openxmlformats-officedocument.spreadsheetml.sheet | application/vnd.ms-excel |
| Magic Bytes | 50 4B 03 04 (PK ZIP) | D0 CF 11 E0 (OLE2) |
| JSON Key Mapping | Header row cell values → object keys | Same |
| Empty Cell Handling | Omitted from sparse arrays | Omitted from sparse arrays |
| Max Sheet Name Length | 31 characters | 31 characters |