This tool converts a CSV file into a real Excel .xlsx workbook in your browser. Unlike renaming a file to .xls, which only produces a fake spreadsheet Excel complains about, this builds the proper OOXML format so the result opens cleanly everywhere and treats numbers as numbers.
How it works
There are three stages, all running locally:
- CSV parsing. The text is parsed according to RFC 4180. Quoted fields are unwrapped, doubled quotes (
"") become a single literal quote, and commas or newlines inside quotes are kept as part of the field rather than splitting it. - Cell typing. Each value is checked against a numeric pattern. Genuine numbers become Excel number cells; all other values become inline string cells, which preserves IDs, dates and anything with leading zeros exactly as written.
- Workbook assembly. The tool writes the required OOXML parts —
[Content_Types].xml, the relationship files,workbook.xml, a smallstyles.xmlfor the optional bold header, and the worksheet itself — then packs them into a ZIP using the STORE method with a correctly computed CRC-32 on every entry. That ZIP, with an.xlsxextension, is a valid Excel workbook.
No spreadsheet library is loaded and nothing is sent anywhere; the entire converter is a few hundred lines of JavaScript running on your machine.
What makes a real .xlsx file
The .xlsx format is an OOXML package — a ZIP archive containing XML files that
describe the workbook structure, sheet data, styles, and relationships. Excel,
LibreOffice, Google Sheets, and Numbers all know how to unzip and read it.
When you rename a CSV to .xls or .xlsx, you get a text file with the wrong
extension. Excel opens it with a warning (“the file format and extension do not
match”) and may misinterpret the encoding or delimiter. The result is a file that
looks like a spreadsheet but is not one — and it cannot be reliably processed by
apps that read the binary format.
This converter builds the actual ZIP-of-XML structure that the format specifies. Excel opens the result without warnings, and numeric cells are real number cells you can sum, average, sort, and use in formulas.
Cell typing in detail
The converter writes two types of cells:
- Number cells — when a value matches a finite decimal (no leading zeros, no grouping commas, no extra characters). These appear as right-aligned numbers in Excel and participate in formulas.
- Inline string cells — everything else, including dates, postcodes, phone numbers, and IDs with leading zeros. The string is stored as-is, preserving the original characters exactly.
The conservative rule is intentional. Excel’s own CSV import auto-detects dates
and silently converts them, often corrupting scientific gene IDs (like 1E5,
read as 100000) or postcodes (like 01234, losing the leading zero). This
converter never silently reformats a value — if a cell looks like a number but
has formatting that signals “identifier”, it stays as text.
Supported delimiters and European locales
The parser supports comma, semicolon, tab, and pipe. European CSV files frequently
use semicolons because the comma is used as a decimal separator in those locales.
A German Excel export of 1.234,56 (one thousand, two hundred and thirty-four
point fifty-six) with semicolons as field separators will round-trip correctly if
you set the delimiter to semicolon before converting.
Tips and example
Given a CSV whose first line is name,age,city, leave Bold first row ticked to get a styled header, and the age column will arrive as real numbers you can sum or sort. If your export uses semicolons (common in European locales) switch the delimiter to semicolon so the columns split correctly.
For the reverse direction — pulling data back out of a spreadsheet — use the companion XLSX to CSV converter.