Skip to content
Data2026-08-282 min read

Symptom: after converting, dates become a number

You export Excel to JSON and the date that should be 2023-01-01 becomes 44927; Chinese is occasionally garbled; empty cells just disappear. The tool isn't broken — it's how Excel stores data.

Pit 1: dates become numbers (Excel serial)

Excel internally doesn't store a "date" — only a number: days counted from the base date 1899-12-30. So 44927 means 44927 days after that base, i.e. around 2023-01-01.

If conversion doesn't special-case it, you get the day count, not a date string. Restore it properly:

// Excel serial -> JS Date (use UTC to avoid timezone shift)
function excelDateToISO(serial) {
  const utc = Math.round((serial - 25569) * 86400 * 1000);
  return new Date(utc).toISOString().slice(0, 10);
}
console.log(excelDateToISO(44927)); // 2023-01-01

Pit 2: Chinese garbled (encoding)

If any link in the export chain used a non-UTF-8 encoding (e.g. reading GBK CSV as UTF-8), Chinese garbles. Standardizing on UTF-8 for both export and read fixes it.

Pit 3: empty cells / headers

  • Empty cells: many tools just omit the field, making each row's keys inconsistent; if you need to keep them, explicitly output null for empties;
  • Headers: the first row is usually column names and should become object keys; if the file has no header, specify one or number columns sequentially.

How to convert correctly with a tool

Open the Excel to JSON tool on ToolVault:

  1. Upload or drop an .xlsx;
  2. The tool restores date serials to readable dates and handles Chinese as UTF-8 without garbling;
  3. Choose output shape (array of objects / by column); empty-value policy is configurable;
  4. Copy JSON in one click; pair with CSV to JSON for plain-text tables.

FAQ

Why is my 44927 off by one day?

Excel has the famous "1900 leap year bug" — it treats 1900 as a leap year, over-counting one day. The 25569 offset above already corrects this; using UTC also avoids the local timezone pushing the date back a day.

I only want some columns?

Filter in Excel first, or pick needed keys in code after conversion.

Will large files lag?

Excel parsing runs locally in the browser; the larger the file, the more memory. For huge sheets, split first or keep only the necessary sheet.


Provided by ToolVault. Related tools: Excel to JSON, CSV to JSON, JSON Formatter. Visit the home page for more developer tools.


Advertisement