PDF, Document & Spreadsheet Tools

CSV to XLSX Converter

Convert CSV to a real XLSX workbook in your browser: detect the delimiter and encoding, keep leading zeros and long IDs as text, type numbers and dates, freeze and bold the header, and set column widths.

  • XLSX file
  • Type decisions per column
  • Preview
Runs in your browser

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics.

CSV to XLSX workspace

1 Your CSV

Example:

Drop a .csv, .tsv or .txt file, or (up to 50 MB).

Reading and typing options

2 Workbook and type decisions

Paste a CSV or drop a file, then choose Convert to XLSX. Nothing leaves your browser.

What the CSV to XLSX Converter does

This converter turns a CSV or TSV file into a real Excel workbook (.xlsx) in your browser, deciding a type for every column and showing you why: numbers become numbers, ISO and unambiguous dates become Excel dates, and anything that Excel would damage - postcodes and customer codes with leading zeros, card or account numbers longer than 15 digits, codes such as 12E4 - stays text.

Opening a CSV directly in Excel runs its own guessing, which is where 00731 becomes 731, 4012888888881881 becomes 4012888888881880 and 03/04/2024 becomes whichever date your computer's locale prefers. Building the XLSX yourself, with the decisions visible, avoids all three. The file is read and the workbook is built on your device; nothing is uploaded.

How to use it

  1. Paste the CSV, or drop a .csv, .tsv or .txt file. The encoding (UTF-8, UTF-16, or Windows-1252 as a reported fallback) and the delimiter are detected; override the delimiter if the guess is wrong.
  2. Tell the converter how your numbers and dates are written: a decimal point or a decimal comma, and whether slash dates are day first or month first. Left on automatic, slash dates are converted only when the data proves the order.
  3. Choose Convert to XLSX. Each column shows the type it will be stored as and the reason; change any column's type from its drop-down and the workbook is rebuilt.
  4. Check the preview, then download. The header row is bold, frozen and (optionally) has filter buttons, and column widths follow the longest value.

Reading the results

Auto (number), Auto (date) and so on are the converter's decisions from the whole column, not from the first row. One non-numeric value in a column is enough to keep it as text, because a mixed column converted to numbers would lose that value's meaning.

Kept as text is deliberate for identifiers. Excel stores numbers as 64-bit floating point and displays at most 15 significant digits, so a 16-digit account number cannot survive as a number. Text cells are written with the Text (@) number format so that editing them in Excel does not convert them later.

Dates are stored as Excel serial numbers with a yyyy-mm-dd format - the preview shows both - so they sort, filter and calculate as dates rather than as strings.

Worked example: an order export with codes, dates and money

The first example has seven columns. customer_code holds values such as 00731 and 00004, so it is kept as text and the zeros survive; postcode (02139) is kept as text for the same reason. order_id (100045...) is all whole numbers and becomes a number column.

placed_on holds ISO dates. 2024-01-31 is stored as the serial 45322: 1 January 2024 is serial 45292 in Excel's 1900 date system, and 31 January is 30 days later. 2024-02-29 is accepted because 2024 is a leap year; 2023-02-29 would not be, and would keep the column as text.

amount mixes 1234.50, 89.99, 12500, 0.5 and -45.00 - all numbers, so the column is numeric. The notes column contains =HYPERLINK(...): it is written as a text cell, never as a formula, so opening the workbook does not run it.

Why converting beats double-clicking the CSV

When Excel opens a CSV it applies the regional settings of the computer it runs on. The same file can open with correct dates in London and swapped days and months in New York, and a semicolon-separated European file can land in a single column. A workbook built with explicit decisions opens the same way everywhere, because the types are stored in the file instead of being guessed again on every open.

What the XLSX contains

One worksheet with your data as shared strings, numbers and booleans; a style sheet with a bold header, a yyyy-mm-dd date format and a Text format for identifier columns; a frozen first row; optional filter buttons; and column widths. It follows the Office Open XML structure in ECMA-376, so Excel, LibreOffice Calc, Numbers and Google Sheets all open it.

Limitations: what the result does not prove

  • It writes one worksheet per conversion and no formulas, charts, colours or conditional formatting. If you need formulas, add them in Excel after converting.
  • Type detection reads patterns, not meaning. A numeric column of product codes without leading zeros becomes numbers unless you set it to Text - check the column list before downloading.
  • Slash dates that read the same in either order (01/02/2024) are left as text unless you choose the order; the converter does not guess a locale.
  • Very large files are limited by your browser's memory. The limit here is 50 MB of CSV, and an XLSX sheet holds at most 1,048,576 rows and 16,384 columns.

Privacy: where your data goes

Everything you paste, type or drop is processed in this browser tab. It is not uploaded, logged, stored or sent to analytics. Session recording and tag-manager scripts are switched off on this page.

Standards and sources

Frequently asked questions

How do I keep leading zeros when converting CSV to Excel?

Leave the column on Auto: any column where a value starts with a zero followed by more digits (such as 00731 or 02139) is stored as text with Excel's Text format, so the zeros are kept and stay kept when someone edits the cell later.

Why does Excel change my long ID numbers to end in zeros?

Excel stores numbers as double-precision floating point and shows only 15 significant digits, so the 16th digit onwards is lost. This converter keeps any value of 16 or more digits as text, which is the only way to preserve card, IBAN-like or tracking numbers exactly.

Will 03/04/2024 become 3 April or 4 March?

Neither, unless the column itself settles it or you choose. If any value has a first part above 12 (13/01/2024) the column is read day first; if a second part is above 12 it is month first. If nothing settles it, the column stays text and you pick Day first or Month first.

Can it convert a semicolon CSV with decimal commas?

Yes. The delimiter is detected, and choosing Comma as the decimal separator reads 1.249,00 as one thousand two hundred and forty-nine and 14,99 as fourteen point nine nine. Both become real numbers in the workbook.

Is a cell like =SUM(A1) turned into a formula?

No. Every text value is written as a string cell; the converter never writes a formula element. That protects you from CSV formula injection, because nothing in the file is calculated when the workbook opens.

Which encodings can the CSV be in?

UTF-8 with or without a byte order mark, UTF-16 with a byte order mark, and anything else is read as Windows-1252 with a visible warning, since that is the usual encoding of CSVs saved by older Excel versions on Windows. If accented letters look wrong, re-save the file as UTF-8.

Does my file get uploaded to convert it?

No. The CSV is read with the browser's FileReader, parsed and typed in JavaScript, and the XLSX package is zipped in the page with the browser's own compression. You can disconnect from the internet after the page loads and it still works.

Last reviewed by the A2Z.Tools team against the sources listed above.

Rate this tool

Was this tool useful? Your feedback helps us improve it.

No ratings yet — be the first to rate this tool.
Your rating (required)
0 / 2000

Please do not include passwords, payment details or other sensitive information.

Your feedback is sent privately to the A2Z.Tools team and will not be posted publicly.