Convert Excel to JSON
Drop an .xlsx file and the JSON appears at once. The workbook is read in this tab, so a spreadsheet of customer records stays on your machine.
How to use it#
- Drop an .xlsx file on the box, or click to choose one.
- Choose a sheet, or all of them, and whether the first row holds the column names.
- Copy the JSON, or download it as a .json file named after the workbook.
One sheet, or all of them#
A workbook with one sheet gives an array, one object per row, keyed by the column names in the first row. A workbook with several sheets starts with all of them, as an object keyed by sheet name with each sheet's array inside, and the Sheet menu picks out any single one instead.
The all-sheets shape is the one the JSON to Excel converter turns back into a workbook with the same sheets, so a workbook can go to JSON, be edited or generated in code, and come back as a workbook.
What each cell becomes#
Numbers stay numbers and TRUE and FALSE become booleans, because the workbook stores each cell's type and there is nothing to guess. Text stays text, so a code typed as 007 in a text cell comes through as "007". An empty cell is null, so every object in a sheet has the same keys.
Dates become ISO text, since JSON has no date type: a date on its own is written as 2024-03-01, and a date with a time as a full timestamp in UTC. A formula comes through as the value Excel last calculated for it, not the formula itself. A merged cell gives its value to the first cell of the merge, and the others are empty.
With a header row, blank rows are skipped, which is usually what a hand-made sheet with spacing rows needs; without one, only the blank rows at the end go. Column names that repeat get a number, so two columns called id become id and id2, and a column with no name is called after its position, such as column4.
Files it cannot open#
The page reads .xlsx, the format Excel saves by default and every other spreadsheet program can export. From Google Sheets, choose File, Download, Microsoft Excel (.xlsx), and drop that file here; from Numbers, use File, Export To, Excel. The older .xls format from before 2007 is a different file entirely; open it in Excel, Numbers, or LibreOffice and save it as .xlsx first. A workbook protected with a password to open is encrypted, and has to be saved again without the password.
A .csv file is plain text rather than a workbook, and the CSV to JSON converter reads it directly, with the delimiter detected for you.
Frequently asked questions#
What happens with several sheets?
#
By default you get every sheet, as an object whose keys are the sheet names and whose values are each sheet's rows. Pick a single sheet from the Sheet menu to get just its array. The JSON to Excel converter reads the all-sheets shape back into a workbook of the same sheets.
Can columns become nested objects?
#
Yes. Tick Nest dotted column names and a column called address.city becomes {"address": {"city": ...}} in each record. A name that would collide, such as a column called address beside one called address.city, stays as it is so that neither value is lost. This undoes the flattening the JSON to Excel converter offers.
Why are my dates text?
#
JSON has no date type, so dates are written as ISO text, such as 2024-03-01, which every programming language parses. A date with a time of day is written with the time, in UTC.
What if the first row is not a header?
#
Untick First row is a header and each row becomes an array of its cells instead of an object, with the first row included as data.
Is my spreadsheet uploaded?
#
No. The file is unzipped and read by JavaScript in this tab, and nothing is sent anywhere.