Excel to JSON Converter
Convert any sheet of an .xlsx, .xls or .csv file to a JSON array of objects or arrays, with dates as ISO strings and empty cells as null. Runs locally.
The interactive tool loads here when JavaScript runs.
About this toolWhat is the Excel to JSON Converter?
The Excel to JSON Converter reads an .xlsx, .xls or .csv file in your browser, lets you pick a sheet, and turns its rows into JSON. You can have an array of objects keyed by the header row, or an array of arrays that mirrors the grid, pretty-printed or compact, ready to copy or download.
Cells keep their types. Numbers stay numbers, text stays text, empty cells become null so every object has the same keys, and cells formatted as dates come out as ISO 8601 strings like 2024-01-15 instead of Excel's internal serial numbers. Files are parsed with the SheetJS library and never leave your machine.
The limit is 10 MB per file. Formulas are not evaluated; the converter uses the value Excel saved with the file, which is what you saw the last time it was opened in Excel.
- Reads .xlsx, .xls and .csv with SheetJS
- Any sheet of a multi-sheet workbook
- Date cells as ISO 8601 strings, independent of your time zone
- Empty cells as null for consistent keys
- Array of objects or array of arrays, pretty or compact
- Runs in your browser; files are not uploaded
Updated
How to use the Excel to JSON Converter
- Click the upload area and choose an .xlsx, .xls or .csv file up to 10 MB.
- Pick a Sheet from the dropdown if the workbook has more than one.
- Choose an Output Format: Array of Objects (keys from the header row) or Array of Arrays (one inner array per row).
- Set the options. Include Headers uses the first row as keys in object mode, or keeps it as the first row in array mode. Pretty Print adds two-space indentation.
- Click Convert to JSON, then Show Preview to read it, Copy to put it on the clipboard, or Download to save a .json file named after your spreadsheet.
Worked example
A sheet with a date column and a blank cell
Input
name | joined (date format) | zip (text) | score Ada | 15/01/2024 | 00123 | 5 Lin | 01/06/2024 13:30 | (empty) | (empty)
Output
[
{ "name": "Ada", "joined": "2024-01-15", "zip": "00123", "score": 5 },
{ "name": "Lin", "joined": "2024-06-01T13:30:00", "zip": null, "score": null }
]The date cells come out as ISO strings, with a time part only where the cell has one. The zip column was stored as text in the workbook, so the leading zeros survive. Empty cells are null, so both objects have the same four keys.
Background and insight
Excel does not store dates as dates. A cell showing 15/01/2024 holds the number 45306, the count of days since the start of 1900, plus a number format that tells Excel to display it as a date. Converters that ignore the format hand you 45306, and the JSON that reaches your API is wrong in a way that is easy to miss. This tool checks each numeric cell's format and converts date cells to ISO strings itself, without going through a JavaScript Date, so the result does not shift by a day in time zones west or east of UTC.
The 1900 system has a famous quirk: it counts 29 February 1900 as a real day, a bug copied from Lotus 1-2-3 for compatibility, so serials from 61 onward are one more than a naive day count. Older Mac workbooks may use the 1904 system instead, which starts four years later. The converter reads the workbook's date-system flag and handles both.
An .xlsx file is a zip of XML parts defined by the Office Open XML standard (ECMA-376), while .xls is the older binary BIFF format. CSV has no types at all. Spreadsheet software guesses, which is how ZIP codes lose their leading zeros and gene names turn into dates. For CSV files this converter guesses as little as possible: plain numbers such as 42 or -3.5 become numbers, TRUE and FALSE become booleans, and everything else, including 00123 and 2024-01-15, stays a string exactly as written.
Common use cases
Seeding a database
Turn a spreadsheet of products, users or reference data from a colleague into JSON for a seed script.
Feeding an API or mock server
Convert a sheet of test cases into a JSON array for Postman, a mock server or a fixture file.
Static site data
Export a pricing table or event list maintained in Excel into the JSON a static site generator reads.
Checking what a sheet really contains
See the underlying values and types behind the formatting, such as numbers stored as text.
Tips and limitations
- Headers become keys exactly as written, spaces included. Clean them in the sheet first if you want camelCase keys.
- Empty header cells produce keys like __EMPTY, and repeated header names get a suffix such as name_1.
- Merged cells only hold a value in their top-left cell; the other cells in the merge come out as null.
- Blank rows are skipped in Array of Objects mode but kept as rows of nulls in Array of Arrays mode.
- With Include Headers off in object mode, keys are the column letters A, B, C, which is handy for sheets with no header row.
- Time-only cells such as 18:00 come out as "18:00:00". Hidden rows and columns are still exported.
Sources and further reading
- ECMA-376: Office Open XML file formats, Ecma International. The standard that defines the .xlsx package
- Excel incorrectly assumes that the year 1900 is a leap year, Microsoft Learn. Microsoft on the 1900 leap-year bug inherited from Lotus 1-2-3
- Date systems in Excel, Microsoft Support. The 1900 and 1904 date systems and how serial numbers work
- Gene name errors are widespread in the scientific literature, Genome Biology. Ziemann and colleagues, 2016, on spreadsheets turning gene names into dates
- SheetJS Community Edition documentation, SheetJS. The parsing library the converter uses
Frequently asked questions
Why do Excel dates turn into numbers like 45306 in JSON?
Excel stores dates as serial numbers, days counted from 1900, and only displays them as dates through cell formatting. Converters that read the raw value give you that number. This converter checks the format of each cell and outputs date cells as ISO strings such as 2024-01-15.
How do I convert an Excel sheet with multiple tabs to JSON?
After you upload the file, the Sheet dropdown lists every tab in the workbook. Pick one and click Convert to JSON. To export several tabs, convert and download each one in turn.
How are empty cells represented in the JSON output?
As null. Every object gets every column key, so code reading the JSON can rely on the keys being present and check for null, instead of handling missing properties.
Are Excel formulas calculated during conversion?
No, the converter uses the last value Excel saved with the file, not the formula. If the workbook was generated by a script and never opened in Excel, formula cells may have no cached value and come out empty.
Why did my ZIP codes lose their leading zeros?
Because the column is stored as numbers in the workbook, usually after Excel converted it on import. The zeros are gone from the file itself, so no converter can restore them. Format the column as Text and re-enter the values, or convert the original CSV here, where 00123 stays the string "00123".
Is it safe to convert a confidential spreadsheet here?
The file is read with the FileReader API and parsed in your browser tab. It is not uploaded to a server, so the data stays on your computer.
Is there an in-depth guide to the Excel to JSON Converter?
Yes. “Excel to JSON: Dates, Empty Cells and Other Spreadsheet Traps” covers the background, how it works, common pitfalls and worked examples. Read the full guide.
Related Tools You May Like
Free, in-browser tools that pair well with this one.