Convert Excel to JSON

Convert XLSX or XLS spreadsheets into clean, structured JSON directly in your browser using SheetJS. Nothing is ever uploaded.

🌐 Español

Drop your files here (.xlsx, .xls)

🔒 Private by design: your files are processed locally in your browser and never uploaded to any server.

The shape of the JSON you get back, sheet by sheet

The output is decided by two things: how many sheets the workbook has, and whether the first checkbox is ticked. A workbook with one sheet always produces a flat array of objects, one per data row, and the checkbox has no effect on it at all. A workbook with several sheets produces, by default, an object keyed by sheet name in workbook order, so {"Orders": [...], "Customers": [...]}. Untick the box and you get the first sheet’s array alone, everything else discarded.

That first case matters more than it sounds, because it is the common one. Most people arriving at a converter have a single-table spreadsheet and want a JSON array they can drop straight into code. Wrapping that in an object nobody asked for would mean an extra unwrapping step on the other side, every single time. The wrapper exists only when there is genuinely more than one sheet to keep apart.

Blank cells become null so every object has the same keys

Left to its own devices, the underlying library omits a key when the corresponding cell is empty. Convert a customer list where three people skipped the phone field and you get three objects missing Phone entirely while the rest have it. Any code that iterates the array and reads row.Phone now behaves differently depending on which rows happened to be filled in, which is the sort of bug that surfaces a week later in production.

The converter overrides that with an explicit null for every blank. Every object in the array carries the identical key set, in the same order, whatever the sheet looked like. It costs a handful of bytes per row and removes a whole class of downstream surprise.

Dates become ISO timestamps, with one honest caveat

Excel stores a date as a number counting days since an epoch. Convert naively and 15 January 2024 arrives in your JSON as 45306, which is meaningless the moment it leaves the spreadsheet. This converter reads the workbook with date decoding on, so date-formatted cells become real Date objects, and JSON.stringify writes those as ISO 8601 strings.

The caveat is worth stating plainly rather than burying. Those ISO strings are UTC, and the Date is built from the workbook’s date components as local time, so on a machine running ahead of UTC a date-only cell lands on the previous evening. Running a real workbook through the library on a UTC+1 box, a cell holding 15 January 2024 came out as 2024-01-14T23:00:00.000Z. Nothing is lost, but if you slice the first ten characters off that string expecting a calendar date you will be off by one. Compare the instants, or normalise on the consuming side.

Dropping a whole folder of workbooks in one pass

  1. Drop your .xlsx and .xls files onto the box above, or press Choose files. The button says files in the plural because this page takes a batch rather than one document.
  2. Leave Include every sheet (as a JSON object keyed by sheet name) if the file has more than one ticked to keep every tab, or untick it when the extra tabs are notes and lookup tables you do not want in the output.
  3. Leave Pretty-print the JSON (indented, easier to read) ticked for a two-space indented file you can read, or untick it for minified output.
  4. Press Convert Excel to JSON. Each workbook produces its own download, named after the input with the extension swapped for .json.

Every file in a batch uses the same two settings; there is no per-file override. The batch is also all-or-nothing, because the loop has no per-file error handling. One workbook the parser rejects ends the run and takes the already-converted results down with it, so a mixed folder of exports is better run in a couple of smaller passes.

Where a spreadsheet stops being a good source of JSON

Merged cells, multi-row headers, a title banner above the real column names, subtotal rows woven through the data: none of these survive the trip, because the conversion is deliberately a dumb, faithful table read. The first row names the columns, every row after it is a record, and that is the whole model. If your sheet is a formatted report rather than a table, tidy it into a table first.

Nor is there any type inference beyond what the cells already declare. Text stays text, numbers stay numbers, booleans stay booleans, and a column of numeric-looking strings stays strings. That is the correct behaviour for a converter, but it does mean the JSON reflects the discipline of whoever built the sheet.

The tools on either side of this one

The reverse trip is Convert JSON to Excel, which turns a JSON array back into a downloadable .xlsx. When the target is a spreadsheet-friendly text format rather than JSON, Convert JSON to CSV flattens nested objects into dot-notation columns, and Convert CSV to SQL goes one further and emits CREATE TABLE and INSERT statements, one file per run.

If you only need to look at tabular data rather than transform it, CSV Viewer opens a CSV or TSV as a sortable table in the tab. To check what changed between two versions of the same export, Compare Excel & CSV Files lines the two files up by key column and shows the added, removed and changed rows. And once you have JSON in hand, JSON Formatter & Validator is a paste box for tidying or validating it before it goes anywhere. More of the same family lives on the dev tools hub.

Frequently asked questions

My workbook has one sheet. Why is the output an array rather than an object?

Because a single-sheet workbook never needs the wrapper. The converter checks the sheet count first, and anything with one sheet or fewer returns that sheet's array directly no matter how the "Include every sheet" box is set. The keyed object only appears once there are at least two sheets and the box is ticked.

A date column came out as the day before. What is going on?

The workbook is read with SheetJS's cellDates option, which turns a date-formatted cell into a real JavaScript Date built from local components, and JSON.stringify then writes that Date as a UTC ISO 8601 string. On a machine one hour ahead of UTC, a cell holding 15 January 2024 with no time of day serialises as 2024-01-14T23:00:00.000Z, and two hours ahead it lands on 2024-01-14T22:00:00.000Z. The instant is correct, the calendar date reads early, and the fix is to compare the timestamps rather than the leading ten characters.

Which row supplies the property names?

The first row of each sheet, exactly as SheetJS reads it. That works beautifully for an ordinary one-line header and badly for the reports people actually build, where a title sits in row 1 and the real column names in row 3. Delete the decorative rows above your header before converting, otherwise you get objects keyed by a title and a column of blanks.

One file in my batch is corrupt. Do the others still convert?

No. The conversion loop has no per-file error handling, so a workbook the parser chokes on aborts the entire run and nothing at all becomes downloadable, including the files that had already been converted before it. When a batch fails without an obvious culprit, halve it and run each half to find the bad file.

What type does an empty cell become?

Null, and that is a deliberate override. Left alone, SheetJS omits the key entirely for a blank cell, which produces objects whose shape depends on which cells happened to be empty in that particular row. Forcing an explicit null keeps every object in the array carrying the same set of keys, which is what code consuming the file almost always assumes.

Does turning off pretty-printing change anything except whitespace?

No. Both settings serialise the same data structure through JSON.stringify; the only difference is whether it is called with a two-space indent or with none. The minified file is smaller and parses identically, so use indented output while you are eyeballing the result and minified output for anything a machine reads.

Related tools