XLSX to JSON
Convert a spreadsheet to JSON without turning dates into serial numbers.
How this reads your output
The workbook is read in the browser and the first sheet is emitted as an array of objects keyed by the header row. Every value is exported as a string, and that is a decision rather than a shortcut. A spreadsheet does not store dates as dates — it stores a serial number counting days from an epoch — so an export that faithfully passes through the underlying value turns a date column into numbers like 45123. That looks like real data and is silently wrong wherever it lands. Exporting the displayed string keeps what the sheet actually showed, and typing it afterwards is a decision you make with the column in front of you.
What the results mean
- Strings throughout
- Deliberate. Type inference on the way out is where dates become serial numbers.
- Serial number
- How a spreadsheet stores a date internally — days since an epoch. 45123 rather than a date.
- Header row
- Becomes the object keys. A sheet with a title row above the table produces keys from the title.
- First sheet only
- Keeps the output shape predictable rather than nesting by sheet name.
Common problems and fixes
- My dates came out as strings
- Deliberately. The alternative is serial numbers, which look like real data and are wrong. Parse them on the way in, where you know the column is a date.
- The keys look like a title rather than column names
- The header row is not the first row of the sheet — there is a title or a note above the table. Delete those rows first.
- Only one sheet converted
- By design. Convert each sheet separately to keep the output a flat array rather than nested by sheet.
Frequently asked questions
Why are the values all strings?
Because inferring types on the way out is exactly where the damage happens. A date in a spreadsheet is a serial number, and passing it through faithfully gives you 45123 — which is worse than a string because nothing about it looks wrong.
What is a date serial number?
How spreadsheets store dates: a count of days from an epoch. The date is a display format over that number, so an export that reads the stored value gets the number.
Is my file uploaded?
No. It is read and converted entirely in your browser, which matters for a format that usually holds payroll or customer data.
Put this on your own site
Free to embed, no attribution required beyond the source link the frame carries itself. It runs entirely in your visitor's browser, sets no cookies and loads no third-party script.
<iframe src="https://runthetests.com/embed/xlsx-to-json/" width="100%" height="720" style="border:1px solid #e5e5e5;border-radius:8px" title="XLSX to JSON" loading="lazy"></iframe>
Preview it at https://runthetests.com/embed/xlsx-to-json/. Embedded pages are marked noindex, so yours stays the canonical copy — not this one.