Convert CSV and Excel

Turn a CSV into a real .xlsx workbook, or pull the first sheet out of an Excel file as CSV, in the browser with SheetJS.

Convert CSV and Excel

0 characters

Three steps — nothing to install

  1. Paste CSV or choose a file

    CSV in the box for the Excel direction, or an .xlsx file from your device.

  2. Pick the direction

    CSV to .xlsx, .xlsx to CSV, or CSV to TSV and back.

  3. Download the result

    The .xlsx is written in the tab; the file never leaves your device.

Why .xlsx needs a library

An .xlsx file is a ZIP archive of XML parts: a workbook description, a sheet per tab, a shared string table and relationships between them. Writing one by hand is possible and easy to get subtly wrong, which is why this page uses SheetJS, about 280 KB, loaded only when you press Run.

CSV is the opposite: plain text, one table, no types. That simplicity is why it is still the exchange format between systems, and why converting to Excel is usually about giving someone a file they can open with a double-click rather than about adding features.

What survives the round trip

Cell values survive: text, numbers and dates as Excel stores them. Formulas do not — the .xlsx to CSV direction exports the last calculated value, because a CSV has nowhere to put a formula. Formatting, merged cells, column widths, charts and multiple sheets are lost in the same direction: one sheet, plain values.

Dates are the usual surprise. Excel stores a date as a number of days since 1899-12-30, so a date written as text in the CSV may arrive as text in the workbook. If a column must be a date, format it in Excel after opening; the converter does not guess.

Delimiters, quoting and limits

The CSV parser follows the quoting rules: a cell may be wrapped in quotes, may contain the delimiter, a line break or doubled quotes. Semicolon and tab are offered because exports from European locales and from clipboard copies use them; choosing the wrong delimiter produces one wide column.

A workbook with several sheets converts its first sheet only, and says which one. For a few hundred thousand rows, the tab's memory is the limit; for a very large export, a desktop tool with streaming is a better fit. For JSON rather than CSV, see the JSON and CSV converter.

Frequently asked questions

Does it convert every sheet?No. The .xlsx to CSV direction exports the first sheet and names it in the result.
What happens to formulas?Their last calculated value is exported. A CSV has no formula syntax.
Are dates kept as dates?Values are kept as stored. Text dates stay text; format the column in Excel if needed.
How large a file can it handle?A few hundred thousand rows is the practical limit, set by the tab's memory.
Is my spreadsheet uploaded?No. SheetJS runs in this tab and reads the file from your device.
How big is the library?About 280 KB, loaded from this site only when you press Run.