What are Excel files and CSV?

An Excel file (XLSX, or XLS in older versions) is a workbook: it can hold many sheets, and every cell keeps its value together with a number format, such as a date, a percentage, or a currency. CSV (Comma-Separated Values) is plain text with one row per line and the cells separated by commas. It has no sheets, formats, or formulas, which is why almost every program can read it: databases, scripts, web apps, and other spreadsheets.

Converting between them is a daily task. You export a sheet to CSV to import it somewhere else, and you turn a CSV export into an Excel file to sort, filter, and share it.

Tool description

This tool converts Excel files to CSV and CSV to Excel in your browser. Choose an XLSX, XLS, or ODS file, pick a sheet, and get its CSV with the values as the sheet shows them. Or paste CSV, or choose a CSV file, and download an XLSX file in which numbers, dates, and TRUE/FALSE are real Excel values, not text. The swap button turns the result around, so you can check a round trip.

Features

  • Reads XLSX, XLSM, XLSB, XLS (Excel 97 to 2003 and older), Excel templates, and OpenDocument (ODS) files
  • Lets you pick any sheet of a workbook, including hidden ones, which are marked
  • Writes each value as Excel shows it, such as 25.6%, 1,234.50, or 15.01.2024
  • Writes dates in Excel's default short date format as ISO dates (2024-01-15), which no program can misread
  • Keeps long numbers whole, such as 123456789012345, where Excel's own CSV export writes 1.23457E+14
  • Finds the delimiter of a CSV by itself: comma, semicolon, tab, or pipe
  • Turns numbers, TRUE/FALSE, and ISO dates into real Excel values, and keeps values like 00123 as text
  • Sizes the columns of the new XLSX file to fit their contents
  • Previews the sheet with its rows and columns before you download it
  • Runs in your browser, so your files never leave your device

How it works

The tool uses SheetJS, a widely used spreadsheet library, to read and write workbooks, and Papa Parse, a fast CSV parser, to read CSV. The conversion runs in a background thread, so the page stays responsive with large files.

From Excel to CSV, every cell is written with its number format applied, just like Excel's "Save as CSV", and formulas are written as their last calculated value. Cells with the General format are the exception: Excel shows at most 11 characters of them, so the CSV gets the full number, rounded to the 15 digits Excel stores. Cells that contain a comma, a quote, or a line break are wrapped in double quotes, and the file is saved as UTF-8.

From CSV to Excel, each cell becomes:

CSV cell Excel cell
42, -3.5, 1e6 Number
00123, +123, 1,234 Text, to keep the zeros and signs
Whole numbers with more than 15 digits Text, since Excel would round them
TRUE, false TRUE or FALSE
2024-01-15, 2024-01-15 10:30, 2024-01-15T10:30:00 Date, or date and time
Anything else, including =SUM(A1:A3) Text

Other date styles, such as 01/02/2024 or 15.01.2024, stay text, because the same digits mean different days in different countries. Blank lines in the CSV stay as empty rows.

Tips

  • If a CSV opens in Excel with every row in one column, convert it here: the delimiter is found for you.
  • To open a CSV in Excel with non-English letters shown correctly, convert it to XLSX first.
  • CSV files are read as UTF-8 or UTF-16, and otherwise as Western European (Windows-1252) text. For other alphabets, save the CSV in Excel as "CSV UTF-8".

Notes

  • A CSV holds one sheet. To convert a whole workbook, download the CSV of each sheet.
  • Password-protected workbooks can't be read. Remove the password in Excel first.
  • Formulas are not kept in either direction: CSV has no formulas, so a cell like =SUM(A1:A3) in a CSV becomes text.
  • Formatting such as colors, fonts, merged cells, and charts is not part of CSV.
  • An Excel sheet holds up to 1,048,576 rows and 16,384 columns, and a cell up to 32,767 characters.