CSV to Excel, and back

Give it a CSV and get an .xlsx, or give it a workbook and get CSVs. Leading zeros survive, accented characters open correctly in Excel, and the file never leaves your device.

How it works

Converting between CSV and Excel is a line of code, which is why there are a thousand converters and why most of them hand back a file that is subtly wrong. The conversion is not the hard part. What matters is the handful of things Excel does on its own, none of which are visible on the machine that did the converting.

The first is the encoding. A UTF-8 CSV without a byte order mark opens in Excel on Windows as its ANSI code page, so café becomes café and every name with an accent in it is broken. Three bytes at the front of the file tell Excel what it is reading. This is the single most common complaint about every CSV export ever written, and it is fixed here by default.

The second is that Excel rewrites what it imports. A postcode of 01234 loses its zero and becomes the number 1234. A sixteen-digit card or order number becomes 1.23457E+15, and the original digits are gone rather than hidden. A product code of SEPT1 becomes the first of September. This is the reason a paper had to be written about gene names, and it is why converting to a real .xlsx beats renaming a CSV: in an .xlsx the type of every cell is written down, so a value stored as text stays text. Values that Excel would have changed are found and pinned before they can be, and the count is shown.

The third is not about correctness but about safety. A cell beginning with =, +, - or @ is a formula to Excel, not text, and a spreadsheet built from data somebody else supplied is a way of running their code on the machine that opens it. Those cells are counted and reported rather than silently altered, because rewriting someone’s data without asking is its own kind of wrong.

The smaller decisions follow the same rule. The delimiter is detected by which one splits every line into the same number of fields rather than by which appears most, since a file full of prose has more commas than a semicolon-separated file does semicolons. Every sheet of a workbook is converted rather than only the first. And none of it involves a server: the file is read, converted and handed back inside the browser tab.

How to use it

  1. 1 Choose a CSV, TSV or Excel file. Which way to convert is decided by what you gave it.
  2. 2 Check what it found: the delimiter, the sheets, and any values Excel would have changed.
  3. 3 Leave "opens correctly in Excel" on unless something downstream refuses the byte order mark.
  4. 4 Convert and download.

Good to know

  • A CSV is written with the byte order mark Excel needs, so accented characters are not mangled.
  • Leading zeros and long numbers are stored as text in the .xlsx, so Excel cannot rewrite them.
  • Every sheet of a workbook becomes its own CSV, delivered together as a ZIP.
  • The delimiter is detected by consistency, not by counting, so prose full of commas does not fool it.
  • Cells Excel would run as formulas are counted and reported rather than quietly changed.

Browser support

  • Chrome 94 and later
  • Firefox 93 and later
  • Safari 16.4 and later
  • Edge 94 and later

These are the oldest versions with everything the tool uses. They are worked out from the tool itself, so they change when it does.

Version numbers checked on 2026-09-04.

Three bytes, a leading zero, and the spreadsheet that runs code

Converting a CSV to a spreadsheet is one library call in any language you like. That is exactly why the internet has a thousand converters and why most of them are subtly wrong: the call is the easy part, and everything that decides whether the output is usable happens after it, on a machine the author never sees.

Start with the encoding, because it is the one everybody hits. Excel on Windows does not assume UTF-8. Handed a CSV with no byte order mark it falls back to the system ANSI code page, and every character above ASCII is reinterpreted: café becomes café, Müller becomes Müller, and a customer list arrives looking corrupted. The fix is three bytes, EF BB BF, at the front of the file. It has been the fix for twenty years. It is still missing from most exports, and it is why so many teams believe "Excel cannot handle UTF-8" when what Excel cannot handle is being left to guess.

The second problem is worse, because it destroys data rather than displaying it wrongly. CSV has no types: every value is text, and Excel decides on import what each one means. A postcode of 01234 is read as the number 1234 and the zero is gone. A sixteen-digit order number exceeds what a double can hold exactly, so it becomes 1.23457E+15 and the last digits are not hidden but lost. A product code of SEPT1 becomes a date. That last one was severe enough in genetics that human gene names were officially renamed in 2020 because researchers could not stop Excel corrupting them, which is a remarkable sentence to have to write about a spreadsheet.

This is the real argument for converting to a genuine .xlsx instead of renaming a CSV and hoping. An .xlsx records the type of every cell, so a value written as text stays text no matter what it looks like. The conversion has to be deliberate about it: mark too much as text and real numbers stop being numbers, breaking every formula downstream, so the rule has to be narrow. Leading zeros, integers too long for a double, and the short codes that look like dates. Everything else is left alone.

The third is not correctness but safety. A cell beginning with =, +, - or @ is a formula, and a spreadsheet assembled from data somebody else supplied is a way to run their code on the machine that opens it. The temptation is to sanitise silently by prefixing an apostrophe. The better answer is to count them and say so, because a tool that quietly edits the contents of your data has made a decision that was not its to make. Report, and let the person who understands the data choose.

Frequently asked questions

Why does my CSV open wrong in Excel?

Almost always the encoding. Excel on Windows reads a CSV as its ANSI code page unless the file begins with a UTF-8 byte order mark, so accented characters come out as mojibake. The "opens correctly in Excel" option adds that mark, which is three bytes and fixes it.

How do I stop Excel removing leading zeros?

Convert to .xlsx rather than handing Excel a CSV. In a CSV every value is just text and Excel guesses what it means; in an .xlsx the type of each cell is recorded, so a postcode written as text stays 01234. This tool finds those values and pins them as text before Excel gets a chance.

Can it convert every sheet in a workbook?

Yes, and it does by default. Each sheet becomes its own CSV and they come back together as a ZIP. Converting only the first sheet would throw the rest away without telling you.

Why does it offer semicolons?

Because Excel in many European locales expects them: where the comma is the decimal separator, a comma cannot also separate fields. If your recipient opens a comma file and sees everything in one column, this is why.

What is the warning about cells starting with an equals sign?

Excel treats a cell beginning with =, +, - or @ as a formula rather than as text, so a spreadsheet built from data you did not write can run something when it is opened. The cells are counted and shown so you can decide; they are not altered, because changing your data without asking would be worse.

Is my spreadsheet uploaded?

No. It is read, converted and handed back inside this browser tab by your own device. You can watch your browser’s Network tab while it works: nothing carrying the file goes out.

Related tools

How this tool was built — a step-by-step account of the engine, the code and what went wrong.

Your files are processed on your device and are not uploaded. You can verify this in your browser’s developer tools under the Network tab.