Skip to content

CSV to Excel

Turn a CSV file into a real Excel workbook.

Drop a CSV file here

Only your browser reads them.

How to use CSV to Excel

  1. Add your delimited file. Drop a .csv, .tsv, or .txt file onto the drop area or click to select one from your device.
  2. Check the number setting. Leave Turn numbers into real numbers (so formulas add up) checked for financial and analytics sheets, or uncheck it to keep every cell as literal text.
  3. Build the workbook. Click Convert to Excel to parse the text and generate a native .xlsx file inside your browser Web Worker.
  4. Download and open. Save the .xlsx workbook to open it directly in Microsoft Excel, Google Sheets, LibreOffice Calc, or Apple Numbers.

Your files are processed on this device and never uploaded. They stay private, and there's nothing to delete afterwards.

How to convert CSV to Excel without formatting errors

Opening a raw CSV directly in desktop Excel triggers automatic type guessing that strips leading zeros from ZIP codes, turns 16-digit order IDs into scientific notation, and garbles accented characters. Converting CSV to XLSX in your browser locks every cell to its proper XML type before Excel ever opens the file.

Because plain text files registered under the IANA text/csv Media Type Registration carry no schema or encoding header, Excel guesses delimiters and data types from your operating system locale. Building a native .xlsx workbook stores text cells and numeric cells explicitly, so SUM() formulas work while postal codes and UTF-8 names stay exact.

Unlike cloud converters that upload customer lists or financial tables to remote servers, this tool runs inside a local Web Worker. If you ever need to go the opposite direction and export a finished workbook back to delimited text, use Excel to CSV in the same browser session.

Spreadsheet behavior Opening raw CSV in Excel Converting with CSV to Excel
Leading-zero ZIP codes (02138) Stripped to 2138 Preserved as exact text (02138)
16-digit card or order IDs Rounded after 15 digits Preserved as exact inlineStr text
UTF-8 accents (Café, München) Often garbled without BOM Decoded cleanly as UTF-8 XML
Semicolon or tab files Often jammed into Column A Auto-detected (,, ;, \t)
Header row and column widths Unstyled, narrow default width Bold Calibri header, 8–60 char width

Keeping leading zeros and 16-digit IDs intact

Spreadsheet users often face an annoying trade-off: store everything as text and break SUM() formulas, or convert numbers and lose leading-zero identifiers. Checking Turn numbers into real numbers (so formulas add up) applies a strict numeric filter so only safe values become numeric cells.

How Turn numbers into real numbers handles formulas vs codes

When the checkbox is enabled, isSafeSpreadsheetNumber() verifies that a cell matches a standard integer or decimal without leading zeros. Values such as 42, -19.95, and 0 become real <v> numeric cells that work in SUM, AVERAGE, and charts, whereas 02138 or 00412 stay as text.

If your data starts as an XML feed rather than a CSV, you can also turn XML feeds into formatted Excel tables using the same type-safe workbook writer.

IEEE-754 precision limits beyond 15 significant digits

JavaScript numbers and Excel’s internal numeric cells both rely on 64-bit IEEE-754 floating-point storage, which guarantees exact integers only up to MDN Number.MAX_SAFE_INTEGER IEEE-754 Reference (53 bits, or roughly 15 significant digits).

To prevent Excel from truncating long numbers in CSV exports, any value exceeding 15 significant digits is written as an inlineStr text cell instead of a numeric <v> tag. That keeps 16-digit card numbers, tracking codes, and bank references intact.

Tip: Uncheck Turn numbers into real numbers (so formulas add up) if you are importing raw barcode catalogs or phone directories where no arithmetic formulas are needed.

Auto-detecting delimiters, UTF-8 text, and quote errors

Real-world exports arrive from European ERP systems with semicolons, from database dumps with tabs, or from UTF-8 pipelines with a leading Byte Order Mark (0xFEFF). The parser normalizes all three inputs automatically before building the spreadsheet.

Comma, semicolon, and tab detection for CSV and TSV

When you drop a .csv, .tsv, or .txt file, detectDelimiter() inspects the text to identify whether columns are separated by commas, semicolons, or tabs. Both quoted multiline fields and escaped double quotes ("") follow the IETF RFC 4180 CSV Format Specification.

Pinpointing unclosed quotes and stripping UTF-8 BOMs

A leading UTF-8 BOM is stripped cleanly so it never pollutes cell A1 with invisible characters. If a malformed export leaves a quotation mark unclosed, unclosedQuoteLine() halts conversion and reports the exact line number, while if you also need to convert Markdown notes to Word for the same report package, you can do so locally.

Native XLSX styling, column widths, and sheet naming

Instead of producing a bloated HTML table disguised with an .xls extension, the worker writes genuine Office Open XML parts inside a compressed .xlsx container. Every workbook opens without Excel’s “file format and extension don’t match” warning.

Bold header rows and 8 to 60 character column fitting

Row 1 (r === 0) receives bold Calibri 11 pt styling (s="1") so column headers stand out immediately when you open the sheet in Microsoft Excel, Google Sheets, LibreOffice Calc, or Apple Numbers.

Column widths are measured across every cell and clamped between 8 and 60 characters (<col customWidth="1"/>) so headers and values remain readable without manual resizing. Empty trailing rows at the end of a CSV are trimmed automatically so blank lines never inflate the worksheet.

Sanitizing worksheet names and XML control characters

Excel rejects worksheet names containing \, /, ?, *, [, ], or :, names longer than 31 characters, and the reserved name History (which is renamed to History_sheet). The workbook builder cleans your filename to meet those rules, strips disallowed XML 1.0 control characters so spreadsheets open cleanly everywhere, and lets you bundle converted workbooks into a ZIP afterward when delivering multiple spreadsheets to clients or teammates.

Questions

Why not just open the CSV in Excel?

Double-clicking a CSV in desktop Excel guesses column types aggressively, which strips leading zeros from postal codes, rounds 16-digit account IDs, and misreads UTF-8 accents when no Byte Order Mark is present. Generating a native .xlsx file locks each cell's type cleanly.

How does this tool protect leading zeros and 16-digit IDs?

Before converting a cell to a numeric value, isSafeSpreadsheetNumber() checks for leading zeros and counts significant digits. Postal codes like 02138 and numbers longer than 15 digits are written as inlineStr text cells so Excel never strips zeros or switches to scientific notation.

Do I need to select whether my file uses commas, semicolons, or tabs?

No. The parser inspects your file and detects commas, semicolons used by European Excel exports, and tab delimiters automatically, so .csv, .tsv, and .txt files convert without manual delimiter configuration.

How does the workbook name and worksheet tab get determined?

Both the downloaded .xlsx filename and the worksheet tab name come from your input CSV filename, stripped of its extension. Forbidden characters are removed, names are capped at 31 characters, and the reserved word History becomes History_sheet.

Are financial datasets or customer records uploaded to external servers?

No. Every byte is parsed and packaged inside a local Web Worker in your browser tab, so payroll sheets, invoices, and customer lists never leave your device.

What happens if my CSV has an unclosed quotation mark?

The parser scans quote boundaries before building the workbook and stops with an error showing the exact line number where an opening quote was never closed, making it easy to fix malformed exports.

Updated