Convert CSV to Excel

Drop CSV files here

or paste one below — several files become one workbook, a sheet each

Conversion options

Drop one or more CSV files in and get an .xlsx workbook back. Double-clicking a CSV lets Excel guess each value's type, and it guesses badly: 00721 becomes 721, a 16-digit order number loses its last digit, and MARCH1 turns into a date. This converter decides column by column instead, writes those values as text, and tells you what it decided. Nothing is uploaded.

How to convert CSV to Excel

  1. Drop one or more .csv files into the box above, or paste CSV text into the field. Nothing is uploaded.
  2. Press Convert to Excel. Files you drop are converted straight away.
  3. Read the table under the report. It shows, column by column, whether each one was stored as numbers, dates or text, and why.
  4. Press Download .xlsx. Several files download as one workbook with a sheet for each file.

Why not just open the CSV in Excel?

You can, and Excel will guess what every value is. The guesses happen while the file opens, before you see a single cell, and several of them destroy data in ways that saving does not undo. Microsoft documents the behaviour, and its fix is a setting that most people never find. These are the four that do the most damage.

In the CSVAfter Excel opens itWhat is lost
00721721The leading zeros of postcodes, account and product codes
41111111111111114.11111E+15, stored as 4111111111111110Every digit after the 15th
MARCH1, 1-21-Mar, 2-JanThe original text, replaced by a date serial
=HYPERLINK("...")A live formulaSafety: the cell runs instead of being shown

The second row is the one people notice last. Excel keeps 15 significant digits, so a 16-digit card number, IMEI or order ID is rounded on the way in. The cell shows scientific notation, and changing the format to Number shows the damage: the last digit is now a zero. There is nothing left to recover it from.

The third row has its own history. Excel converted gene symbols such as MARCH1 and SEPT2 into dates so often that a 2016 survey found the errors in about a fifth of published genomics papers with gene lists in Excel files. In 2020 the human gene naming committee renamed the genes to MARCHF1 and SEPTIN2 rather than wait for a fix.

How this converter decides each column

Instead of guessing cell by cell as the file opens, it reads the whole column first. That matters for a postcode column: if Excel's rule were applied to one cell at a time, 10001 would become a number while 02134 stayed text. The column would then sort in two separate groups and a lookup would miss half of it.

  • Numbers are stored as real numbers, so they add up, sort and chart correctly. The exception is any column where even one value has a leading zero or more than 15 digits. That whole column is stored as text.
  • Dates are recognised only in the unambiguous ISO form, 2024-03-15 or 2024-03-15 14:30:00. They become real Excel dates with a matching format. Nothing else is read as a date, because 03/04/2024 means March in one country and April in the next.
  • Everything else is text, stored as text, and shown exactly as it was written. A text cell is never run as a formula and never converted to a date.

The report counts the cases where this made a difference: the columns kept as text and the reason, how many values Excel would have turned into dates, and how many cells began with =, +, - or @. Those are the characters that start a formula when Excel opens a CSV directly. Spreadsheet security guides call this CSV injection, because a crafted cell can run a formula on the machine of whoever opens the file.

Semicolons and decimal commas

In much of Europe, Excel saves CSV files with semicolons between fields and commas as decimal marks, so 12,5 means twelve and a half. The delimiter is detected by counting candidates outside quoted fields. When a semicolon file contains values such as 12,5 and none such as 12.5, the decimal comma is detected as well and those values become numbers. You can set either one yourself if the file is unusual.

Several CSVs, one workbook

Drop several files and each becomes its own sheet, named after its file. Excel is strict about sheet names. They can be at most 31 characters long and cannot contain [ ] : * ? / \. Two sheets cannot differ only in capital letters, and the name History is reserved. Names are adjusted to follow the rules and every change is listed, so 2024/Q1 sales.csv becomes a sheet you can still recognise. A file with more than 1,048,576 rows, the limit for one sheet, continues on a second sheet with the header repeated. Opening the same file in Excel would warn you and leave the extra rows out.

What the workbook contains

A standard .xlsx file that opens in Excel, Google Sheets, LibreOffice and Numbers. Header cells are text, with filter buttons on the header row, and column widths are set from the longest value so nothing is hidden behind #####. Line breaks inside quoted fields stay inside their cells. A byte order mark at the start of the CSV is removed rather than glued onto the first heading. The CSV is read with the same parser as the other data tools on this site, which follows RFC 4180.

Next steps

Going the other way, Excel to CSV exports every sheet with dates and full-precision numbers, and Excel to JSON turns a sheet into typed objects. If the CSV is too large to handle, split CSV breaks it up without cutting through a quoted field. CSV to JSON converts it for code instead of a spreadsheet. All of them are on the data tools page.

Frequently asked questions

Why does Excel remove the leading zeros from my CSV?

A CSV has no types. When you open one, Excel reads 00721 as the number 721 and throws the zeros away before you see the sheet, and saving does not bring them back. This converter looks at the whole column first. If any value in it has a leading zero, the entire column is written as text, so postcodes, employee numbers and product codes arrive exactly as they were in the file. The report names every column it treated this way.

Why do my long numbers turn into 1.23457E+15?

Excel stores numbers with 15 significant digits. A 16-digit card or order number opened from a CSV is converted to a number, displayed in scientific notation, and its last digit is replaced with a zero - permanently, even if you change the format afterwards. Any column containing a value longer than 15 digits is written as text here, so every digit survives.

Will gene names like MARCH1 or SEPT2 be turned into dates?

No. Excel turns MARCH1 into 1-Mar and 1-2 into 2 January when it opens a CSV, and the problem was common enough that the human gene naming committee renamed those genes in 2020. Values are only written as dates here when they are unambiguous ISO dates such as 2024-03-15. Everything else that Excel would have read as a date stays text, and the report counts how many values were saved from conversion.

Can I combine several CSV files into one Excel workbook?

Yes. Drop several files at once and each one becomes its own sheet, named after the file. Excel limits sheet names to 31 characters, forbids characters such as / and :, and does not allow two sheets whose names differ only in case. Names are adjusted to fit those rules and every adjustment is listed, so you can find each file's sheet afterwards.

What happens to cells that start with = or +?

They are stored as plain text. A CSV cell such as =HYPERLINK(...) becomes a live formula when Excel opens the CSV directly, which is how CSV injection attacks work. In the .xlsx written here it is a text cell, shown exactly as written and never run. The report counts these cells so you can check whether they were meant to be formulas.

My CSV uses semicolons and decimal commas. Will the numbers work?

Yes. The delimiter is detected by counting candidates outside quoted fields. When a semicolon file has values such as 12,5 and none such as 12.5, the decimal comma is detected too, and those values are stored as real numbers rather than text. You can override both if the guess is wrong, and the report says which was used.

What if my CSV has more than 1,048,576 rows?

That is the most rows one Excel sheet can hold. Opening a bigger CSV in Excel shows a warning and quietly drops everything past the limit. Here the data continues on a second sheet with the header row repeated, and the report says how many sheets were needed.

Is my file uploaded?

No. The CSV is read and the workbook is built inside your browser tab. The spreadsheet library is downloaded the first time you convert, but your data never leaves the device, which matters for customer lists and payroll exports.