Developer9 min readUpdated 2026-09-09

How to Convert Excel to CSV

Tools mentioned in this guide

Converting Excel to CSV should be a two-click job, and most of the time it is. What catches people out is everything that happens quietly on the way: a workbook with five sheets becomes one CSV and nothing warns you the other four are gone, an order number like 00123 arrives as 123, and a column of dates comes out in a format the receiving system rejects.

There are four practical ways to do it — in your browser, in Excel itself, in Google Sheets, and from the command line. This guide covers all four, but the more useful part is the middle: which one to pick based on what is actually inside your spreadsheet, and what each one does to your data on the way out.

Pick your method in ten seconds

Skip to the method that matches your file. The differences are not cosmetic — each one changes your data in a different way.

What is in your fileUse this
Several sheets, and you want all of themBrowser tool — it writes one CSV per sheet
Order numbers, ZIP codes, IDs with leading zerosBrowser tool
Confidential data you cannot uploadBrowser tool — the file never leaves your device
Date columnsExcel or Google Sheets, after formatting the column
Accented or non-English charactersExcel, using CSV UTF-8
No copy of Excel installedBrowser tool or Google Sheets
The same conversion every weekCommand line

Method 1: Convert Excel to CSV in your browser

This is the fastest route when you do not have Excel open, when the workbook has several sheets, or when the data is sensitive. The Excel to CSV converter runs entirely in your browser — the file is read locally and never uploaded to a server.

  1. Open the Excel to CSV tool.
  2. Drag your .xlsx file onto the drop zone, or click to browse for it.
  3. Click Convert.
  4. Download the CSV. If your workbook has more than one sheet you get one download per sheet, each named after the sheet it came from.

Two things it does well that desktop Excel does not. First, it exports every sheet: a two-sheet workbook produces two CSV files, where Excel and LibreOffice both give you the first sheet only and say nothing about the rest. Second, text stays text — an order number stored as 00123 comes out as 00123, and a 13-digit product code comes out in full rather than as 9.78012E+12.

Formulas are exported as their calculated results, which is what you want in a CSV: a cell containing a formula that evaluates to 2469 exports as 2469, not as the formula text. Commas and quotation marks inside your data are escaped correctly, so a cell reading a, comma "quote" survives intact.

Two limits worth knowing before you start. It reads the modern .xlsx format only — the legacy binary .xls from Excel 2003 and earlier will fail, so open it in Excel or Google Sheets once and re-save it as .xlsx first. And if your sheet has date columns, read What breaks when Excel becomes CSV below before you rely on the output.

Method 2: Save As CSV in Excel

Excel's own export is the right choice when the file contains dates or non-English characters, because Excel writes out what each cell displays rather than the raw value underneath.

  1. Open the workbook and click the tab of the sheet you want. Excel exports only the active sheet.
  2. Go to File → Save As (or File → Export → Change File Type).
  3. In the file-type dropdown choose CSV UTF-8 (Comma delimited) (.csv) — not the plain CSV (Comma delimited) option.
  4. Click Save, then OK at the warning that only the active sheet will be saved.

That CSV UTF-8 choice matters more than it looks. The plain CSV option writes the file in a legacy regional encoding, which is how Café Müller ends up in a database as Café Müller. Pick the UTF-8 variant and that class of bug disappears.

The cost of this method is the sheet limit. If you need five sheets out of a workbook you repeat the whole process five times, renaming each file as you go — which is the specific chore the browser tool removes.

Method 3: Google Sheets

Useful when you have no spreadsheet software installed at all, or when the file arrived as an email attachment you would rather not download twice.

  1. Go to Google Drive and upload the .xlsx file, then open it in Google Sheets.
  2. Select the tab you want to export.
  3. Choose File → Download → Comma-separated values (.csv).

Google Sheets writes UTF-8 without asking, which makes it a reliable option for non-English text. It shares Excel's limitation of exporting the active sheet only, and it has a privacy cost the other methods do not: the spreadsheet is uploaded to Google's servers. For anything containing customer records, payroll or medical data, use a method that keeps the file on your own machine.

Method 4: Convert Excel to CSV from the command line

If you do the same conversion every week, script it. LibreOffice ships a headless converter that needs no GUI and works identically on macOS, Windows and Linux.

soffice --headless --convert-to csv --outdir ./out book.xlsx

To control the delimiter, quoting and encoding explicitly, pass the filter tokens — comma (44), double-quote (34), UTF-8 (76):

soffice --headless \
  --convert-to csv:"Text - txt - csv (StarCalc)":44,34,76 \
  --outdir ./out book.xlsx

On macOS the binary lives inside the app bundle, at /Applications/LibreOffice.app/Contents/MacOS/soffice. Like Excel, it converts the first sheet only — a two-sheet workbook produces exactly one CSV, with no warning that anything was left behind.

For a Python pipeline, pandas is three lines and gives you a place to clean the data on the way through:

import pandas as pd

df = pd.read_excel("book.xlsx", sheet_name="Sales", dtype=str)
df.to_csv("sales.csv", index=False, encoding="utf-8-sig")

Two details there do real work. dtype=str reads every column as text, which is what stops leading zeros disappearing and long IDs turning into scientific notation. encoding="utf-8-sig" writes the byte-order mark that makes Excel on Windows open the file with the right encoding when you double-click it.

What breaks when Excel becomes CSV

A CSV is a plain text file. It has no cell types, no formatting, no formulas, no multiple sheets and no character-set declaration. Everything Excel knows about your data that is not the text itself is discarded at the moment of export — and the losses are silent. These are the five that actually bite.

What goes wrongWhyFix
Dates change formatCSV has no date type, so the exporter writes whatever the cell displaysFormat the column before exporting
Accents become mojibakeFile written in a legacy encoding, read as UTF-8Export as CSV UTF-8
Leading zeros vanishThe value was already a number in ExcelFormat the column as Text first
Only one sheet appearsCSV holds exactly one tableExport each sheet, or use a tool that does it for you
Formulas turn into valuesCSV cannot store a formulaExpected — keep the .xlsx as your master copy

The rule that explains most of this: CSV export writes what the cell shows, not what it holds. That is worth testing rather than trusting, so I did. The same date, in the same file, converted with the same command, twice — changing only the cell's display format:

Cell display formatWhat lands in the CSV
Default (locale)09-09-2026
yyyy-mm-dd2026-09-09

So the fix for date columns is not to hunt for an export setting. It is to select the column, set its number format to yyyy-mm-dd in the spreadsheet, and export after that. The same trick fixes leading zeros: format the column as Text before you export, and 00123 stays 00123.

One caveat specific to browser-based converters, including this one. They read the raw stored value rather than the displayed text, which is exactly why leading zeros survive — but it also means a date cell can come out as a full machine timestamp such as Tue Sep 08 2026 17:00:00 GMT-0700 rather than a date, and because that rendering uses your local time zone, a date-only cell can appear to shift by a day. If your sheet has date columns and you need them clean, use Excel or Google Sheets for that file, or convert the date column to text in the spreadsheet first.

Check the CSV before you send it

Thirty seconds of checking beats a failed import. Open the CSV in a plain text editor — not in Excel, which re-interprets the file as it opens and hides the very problems you are looking for — and check four things.

  • The header row is present and the column names are what the receiving system expects.
  • Every row has the same number of commas. A row with fewer fields than the header will break a strict parser, and trailing empty cells are the usual cause.
  • Accented characters look right. If you see Café instead of Café, the encoding is wrong — re-export as CSV UTF-8.
  • Dates and IDs look like you expect. This is where the damage is, and it is invisible from inside Excel.

Going the other way afterwards is straightforward too: CSV to Excel rebuilds an XLSX from your CSV, and CSV to JSON converts it for an API. If you are combining several exports, Merge CSV stacks them into a single file.

Frequently asked questions

How do I convert an Excel file with multiple sheets to CSV?
A CSV file holds exactly one table, so multiple sheets must become multiple CSVs. Excel, Google Sheets and LibreOffice all export the active sheet only and leave the rest behind without warning. The browser converter handles this in one pass: it walks every sheet in the workbook and gives you one download per sheet, each named after the sheet it came from.
Why did my leading zeros disappear?
Because they were already gone before you exported. If Excel shows 00123 left-aligned it is text and the zeros are real; if it shows 123 right-aligned, Excel stored it as the number 123 and the zeros were never in the file. Select the column, set the format to Text, re-enter or re-import the values, then export. A browser converter that reads stored values will preserve text-formatted IDs exactly, including 13-digit codes that Excel would otherwise show as 9.78012E+12.
How do I get a UTF-8 CSV out of Excel?
In the Save As dialog choose CSV UTF-8 (Comma delimited) rather than plain CSV (Comma delimited). The plain option uses a legacy regional encoding and is the reason accented names arrive mangled at the other end. If you are scripting it, pandas with encoding="utf-8-sig" writes UTF-8 with the byte-order mark that makes Windows Excel open it correctly on a double-click.
Why are my dates in the wrong format in the CSV?
CSV has no date type, so the exporter writes the text the cell displays. Change the display and you change the file: the same date exported from the same workbook comes out as 09-09-2026 with the default locale format and as 2026-09-09 once the column is formatted yyyy-mm-dd. Set the format in the spreadsheet first, then export — there is no export setting that will do it for you.
Can I convert an old .xls file to CSV?
Not directly with most browser-based tools, which read the modern .xlsx format — a zip of XML files — rather than the legacy binary .xls from Excel 2003 and earlier. Open the file once in Excel, Google Sheets or LibreOffice and re-save it as .xlsx, then convert. LibreOffice's headless converter reads .xls directly if you prefer to stay on the command line.
What happens to my formulas?
They are replaced by their calculated results, which is normally what you want — a cell holding a formula that evaluates to 2469 exports as 2469. CSV has no way to store a formula, so keep the .xlsx as your master copy and treat the CSV as a snapshot. Cells showing an error such as #DIV/0! have no clean text form and are the ones to check before sending the file on.
Is it safe to convert confidential spreadsheets online?
It depends entirely on where the conversion happens. Most online converters upload your file to a server and process it there, which means payroll, customer records or medical data leave your control. The FileNaut converter runs in your browser using JavaScript — the file is read from your disk into local memory and never sent anywhere. You can confirm it yourself: open your browser's Network tab, run a conversion, and watch that no upload request is made.
My CSV rows have different numbers of columns. Why?
Almost always trailing empty cells. If the last column of a row is blank, some exporters stop writing that row at the last cell holding a value, so the row ends up with fewer fields than the header — which strict parsers reject. Put a placeholder such as a single hyphen in the final column, or add a filled column at the right-hand edge, and every row will end up the same width.
How do I convert CSV back to Excel?
Use CSV to Excel rather than double-clicking the CSV, because opening a CSV in Excel re-interprets every column on the way in — that is where leading zeros get stripped and codes like MAR1 become dates. Converting to XLSX first writes the values as text and keeps them intact. If you need the data for an API instead, CSV to JSON handles that in one step.

Ready to try it?

Use the tool right now — free, no signup, no upload.