How to convert an Excel sheet to JSON
- Choose an .xlsx or .xls file. It is read in your browser and not uploaded anywhere.
- Pick the sheet. Every sheet in the workbook is listed, including hidden ones, which are marked "(hidden)".
- Leave First row contains headers on to use the header text as keys, or turn it off to use the column letters A, B, C and so on.
- Copy the JSON from the output box, or press Download JSON to save it as a file named after the sheet.
The result is an array with one object per row, indented with two spaces. Keys appear in the same order as the columns, even when a header looks like a number, such as 2024. Notes above the output say how many rows were converted and whether anything was skipped or renamed.
A worked example
This is a sheet called Orders, as it looks in Excel:
| A | B | C | D | E | F | G | H | |
|---|---|---|---|---|---|---|---|---|
| 1 | Order ID | Customer | Order date | Total | Paid | Shipped at | Total | |
| 2 | 1001 | Ana Silva | 2024-02-14 | $149.90 | TRUE | 2024-02-15 13:45 | 150 | gift wrap |
| 3 | ||||||||
| 4 | 1002 | Ben Okafor | 16/2/2024 | 15% | FALSE | #DIV/0! |
With headers on, the converter shows these notes:
- Converted 2 rows from sheet "Orders".
- Skipped 1 blank row.
- Renamed empty or repeated headers: column G "Total" → "Total (2)"; column H (empty) → "Column H".
and produces this JSON:
[
{
"Order ID": 1001,
"Customer": "Ana Silva",
"Order date": "2024-02-14",
"Total": 149.9,
"Paid": true,
"Shipped at": "2024-02-15T13:45:00",
"Total (2)": 150,
"Column H": "gift wrap"
},
{
"Order ID": 1002,
"Customer": "Ben Okafor",
"Order date": "2024-02-16",
"Total": 0.15,
"Paid": false,
"Shipped at": null,
"Total (2)": "#DIV/0!",
"Column H": null
}
]The empty row 3 is left out, the second "Total" column becomes "Total (2)" so no value is overwritten, and the column without a header gets its letter. The dollar sign and the percent format disappear: JSON receives the number stored in the cell, not the way it is displayed.
How each kind of cell is converted
| Cell in Excel | Shown as | JSON value |
|---|---|---|
| Text | Ana Silva | "Ana Silva" |
| Number, in any number format | $149.90 or 15% | 149.9 or 0.15 |
| TRUE / FALSE | TRUE | true |
| Date | 16/2/2024 | "2024-02-16" |
| Date and time | 2024-02-15 13:45 | "2024-02-15T13:45:00" |
| Time of day | 13:45 | "13:45:00" |
| Elapsed time, format [h]:mm:ss | 36:00:00 | "36:00:00" |
| Error | #DIV/0! | "#DIV/0!" |
| Empty cell | null |
A cell counts as a date or time when its number format displays one. Formulas are exported as the result saved in the file, not as the formula itself. The columns run from the leftmost to the rightmost column that has a value, and with headers on, the first row that contains anything supplies the keys.
Header text is kept exactly as written, with its spaces, dots and capital letters, so Order ID stays Order ID. If your code expects names such as orderId, rename the headers in Excel or map the keys after conversion.
Dates have no time zone
Excel stores a date as a number of days and a time as a fraction of a day, with no time zone attached. The converter turns that number into ISO 8601 text without a Z or an offset, so 2024-02-15T13:45:00 means 13:45 on the clock of whoever typed it. The result is the same on every computer. If the times belong to a particular zone, add that information when you import the JSON.
Common pitfalls
- The 1900 leap-year bug. For compatibility with old spreadsheet programs, Excel treats 1900 as a leap year and gives serial number 60 to 29 February 1900, a date that never existed. The converter handles dates on both sides correctly and leaves a cell with that impossible date as the plain number 60.
- The 1904 date system. Workbooks created with this option, historically on Mac, count days from 1 January 1904, so the same stored number means a date 1,462 days later. The converter reads the setting from the workbook: a cell holding 45336 is 2024-02-14 in a normal workbook and 2028-02-15 in a 1904 workbook, just as Excel shows it.
- Leading zeros. A postcode stored as the number 1234 with the format 00000 is displayed as 01234 but exported as 1234. Store codes and IDs as text if the zeros matter.
- Merged cells. Only the top-left cell of a merged range holds the value. The other cells are empty and become null, or a generated header such as "Column B".
- Large sheets. Excel allows 1,048,576 rows, but the conversion runs in your browser, so files are limited to 10 MB, sheets to the first 50,000 rows and the output to 1,000,000 cells. When something is left out, a warning says so.
Frequently asked questions
Can I convert a CSV file?
Not directly. Only real Excel workbooks are accepted; a CSV or another format is rejected with a message. Open it in Excel or another spreadsheet program and save it as .xlsx first.
Can it read password-protected workbooks?
No. An encrypted workbook cannot be read without the password, so the converter asks you to remove the password in Excel and choose the file again.
Does it convert all sheets at once?
It converts one sheet at a time. Choose another sheet in the list and the output updates immediately, without reading the file again.
How do I get the data back into a spreadsheet?
Use the JSON to Excel converter, which turns an array of objects into an .xlsx file with one column per key.