On-device AI — professional-grade, fully private.

Documents

Converting Excel to CSV and JSON Without Corrupting Your Data

Leading zeros vanish, dates change format, long numbers become scientific notation. Here is why spreadsheet exports break data and how to stop it happening.

Updated August 11, 20265 min read

Exporting a spreadsheet looks like the safest operation in computing, and it is where more data gets quietly corrupted than almost anywhere else. Phone numbers lose their leading zeros. Dates flip between day-first and month-first. Long identifiers turn into 1.23457E+14. Nothing errors, nothing warns you, and the damage is often discovered weeks later by someone downstream.

The four classic corruptions

Leading zeros disappear

A postcode of 01234 or a phone number of 07700900123 is text that happens to consist of digits. A spreadsheet sees digits, decides it is a number, and numbers do not have leading zeros. The value becomes 1234 and 7700900123, and the original is gone.

Long numbers become scientific notation

Anything past fifteen significant digits — credit card numbers, some product IDs, certain barcodes — is more precision than Excel keeps. It displays 1.23457E+14 and, worse, Excel keeps only 15 significant digits: every digit after the 15th is replaced with zero, so a 16-digit card number is permanently altered. This is a genuine loss, not a display quirk.

Dates change meaning

03/04/2026 is the third of April in most of the world and the fourth of March in the United States. CSV has no way to say which one it means. Export on one machine, import on another with different regional settings, and over a third of your dates silently become different dates — every one where both numbers are twelve or below, except the twelve where day and month are the same.

Gene names, and everything like them

The genomics community famously renamed several genes because spreadsheets kept converting SEPT2 into a date. The general problem is broader: any short alphanumeric code that resembles a date or a number is a candidate for silent conversion.

Preventing it

  1. 1Format identifier columns as Text before entering data. Postcodes, phone numbers, account numbers and product codes are labels, not quantities. You will never do arithmetic on them.
  2. 2Use ISO dates. 2026-04-03 is unambiguous everywhere, sorts correctly as plain text, and cannot be misread by regional settings.
  3. 3Export to UTF-8. Otherwise names with accents, currency symbols and anything non-Latin arrive as mojibake on another system.
  4. 4Check the delimiter. Regional Excel installations sometimes export semicolon-separated files, which are still called CSV and are not what most importers expect.
  5. 5Open the exported file in a text editor. Thirty seconds of looking at the raw output catches nearly all of this before it reaches anyone else.

CSV or JSON?

CSVJSON
StructureFlat rows onlyNested objects and arrays
TypesNone — everything is textStrings, numbers, booleans, null
SizeCompactLarger — keys repeat on every record
Best forSpreadsheets, databases, analysis toolsAPIs, config, application data
Human readableYes, in a spreadsheetYes, in a text editor

The deciding question is where the data is going. Another spreadsheet, a database import, or a statistics package: CSV. An API, a web application, or anything that needs to distinguish the number 0 from the string "0" from null: JSON, because it carries types and CSV cannot.

Use Excel to CSV or Excel to JSON depending on the destination, and CSV to JSON when the export already exists.

Conversion runs on your device, not our servers — which matters for customer lists, payroll data and financial models.

Convert a spreadsheet

Cleaning data after conversion

Real exports are rarely clean on the first pass. A few operations cover most of what needs doing:

  • [Remove duplicates](/csv/tools/remove-duplicates) — deduplicate by a key column rather than by whole rows, since two records for the same customer usually differ in some trailing field.
  • [Filter rows](/csv/tools/filter) — strip test records, cancelled orders and blank rows before anyone builds a report on them.
  • [Sort](/csv/tools/sort) — makes problems visible. Sorting by a date column immediately surfaces the entries that parsed as the year 1900.
  • [Split large files](/csv/tools/split) — many import systems cap row counts or file sizes.
  • [Compare two versions](/csv/tools/compare) — the fastest way to see exactly what an export changed.

For JSON destined for an application, run it through the JSON validator before shipping it. A trailing comma or an unescaped quote will be rejected by the receiving system with an error message that rarely points at the actual line.

Why local conversion matters here

Spreadsheets are where organisations keep the data they would least like to leak: customer lists, salaries, pricing, patient records, financial models. Uploading one to a conversion service means handing over the entire contents of that file, and in many jurisdictions doing so without a data processing agreement is a compliance problem regardless of what the service does with it.

Every converter here parses the file on your own device. Nothing is transmitted, which removes the question entirely. For the wider set of document and data tools, the office files hub collects them in one place.

Frequently asked questions

Why do leading zeros disappear when I export to CSV?

The spreadsheet stored the value as a number, and numbers have no leading zeros. Format the column as Text before entering the data, or add an apostrophe prefix in Excel. Once the zeros are gone from the source they cannot be recovered by the export.

How do I stop Excel changing my dates?

Use ISO format — 2026-04-03 — which is unambiguous in every locale and sorts correctly as plain text. Ambiguous formats like 03/04/2026 are interpreted differently depending on the regional settings of whichever machine opens the file.

Should I convert Excel to CSV or JSON?

CSV for spreadsheets, databases and analysis tools — it is compact and universally supported. JSON for APIs and applications, because it preserves types and supports nesting, which CSV cannot express at all.

Is it safe to convert spreadsheets with an online tool?

Only if the file is not uploaded. Ours parses the workbook on your own device, so customer data, salary information and financial models are never transmitted — which also avoids the data-processing questions that uploading would raise.

Keep reading

More in Documents →