Convert CSV to XLSX
Every cell in a CSV is text. Every cell in a workbook has a type. The conversion therefore has to guess, and guessing is where reference numbers lose their leading zeros and where 03/04 becomes a date in whichever order the locale prefers. Knowing that in advance is most of what you need to convert a CSV safely.
Use this without the search next time. Prathom Workbench puts Prathom's tools in your toolbar.
Add to Chrome — freeDrop your CSV file here, or click to browse
Up to 50 MB. Deleted automatically after 30 minutes.
What it does
- Rows and quoted fields parsed correctly, including embedded commas
- Cell types inferred from content, which is worth reviewing
- Output is a single-sheet .xlsx that opens in Excel and LibreOffice
How to use CSV to XLSX
- 1
Upload the CSV
Comma-separated, with or without a header row. Quoted fields containing commas or line breaks are handled.
- 2
Types are inferred
Something that looks like a number becomes a number and something that looks like a date becomes a date. This is convenient and occasionally wrong.
- 3
Audit the columns that are identifiers
Postcodes, product codes, phone numbers and anything with a leading zero are the cells to look at first.
How it works
The CSV is parsed with proper quoting rules: a field wrapped in quotation marks may contain commas and line breaks, and a doubled quotation mark inside one is a literal quote. Each parsed row becomes a row in a new single-sheet workbook.
As each cell is written, its type is inferred from the text. Digits become a number, a recognized date pattern becomes a date, TRUE and FALSE become booleans, and everything else stays text.
Why type inference is both the feature and the hazard
It is the feature because a column of numbers stored as text is nearly useless in a spreadsheet: it will not sum, it sorts alphabetically so 100 comes before 20, and charts refuse it. Inference is what makes the file usable.
It is the hazard because CSV carries no type information, so the inference is a guess made from appearance. A guess is right on genuine numbers and wrong on identifiers that merely look numeric.
The columns to check every time
Anything with a leading zero, anything that is a code rather than a quantity, long numbers that might be rendered in scientific notation, and dates in a slash format. These four cover almost every real import problem.
A safer source
If you control how the CSV is produced, two habits remove most of the risk: write dates as ISO 8601, and quote identifier columns. Quoting does not by itself force a text type everywhere, but combined with ISO dates it removes the ambiguity that causes the worst silent changes.
What a spreadsheet adds that a CSV cannot hold
A CSV is a list of values separated by commas and nothing else. It has no types, no formatting, no formulas, no second sheet and no record of what any column means. Every one of those is added by whatever opens it, which is why the same file can look different in two applications.
Converting to XLSX fixes the interpretation in place. Numbers are stored as numbers, dates as dates and text as text, so the file now carries its own meaning rather than depending on the reader to guess correctly.
That is the real argument for doing this before sharing data with somebody else. They open your interpretation instead of making their own, and the identifier column that would have become scientific notation on their machine does not.
Examples
A data export for a colleague
The recipient gets something they can sort and filter instead of a wall of text. The quoted fields containing commas parsed correctly, which is the failure a copy and paste would have produced.
An inventory file with codes
Both cells changed meaning. The code lost its leading zero and the date resolved by locale rather than by intent. Format those columns as text in the CSV or fix them in the workbook afterwards.
Frequently asked questions
Why did my leading zeros vanish?
Because the column looked numeric and was typed as a number, and a number has no leading zeros. This is the single most common CSV import problem and it affects postcodes, product codes, account references and phone numbers. If those identifiers matter, the reliable fix is in the destination: set the column format to text in the workbook and re-enter or re-import the affected values.
How are ambiguous dates handled?
By inference, which is exactly the problem with a value like 03/04/2026: it is 3 April in most of the world and 4 March in the United States, and the CSV carries nothing to say which. The conversion applies a consistent interpretation, but it cannot know your intent. If a file contains dates, the safest source format is ISO 8601, written as 2026-04-03, which is unambiguous everywhere.
Does the first row become a header?
It becomes the first row of the sheet. CSV has no way to mark a header, so nothing is set as a frozen or styled header row automatically. In practice most spreadsheet applications will treat the first row as labels when you sort or filter, and you can freeze it in one click. Nothing is lost either way.
Further reading
- XLSX Cost 14% More Than the CSV and the Old XLS Cost Nearly Four TimesThe modern spreadsheet formats have a reputation for bloat that they no longer deserve, and the old one has a reputation for compactness it never had. A plain table in four formats puts numbers on both, and the ranking is not the one most people would guess.
- We Sent a CSV Through a Spreadsheet and Watched What DiedOpen a CSV in a spreadsheet, change nothing, save it again, and the file that comes out is not the file that went in. This is well known for postcodes and product codes with leading zeros. We ran a deliberately awkward CSV through the round trip to find out exactly which fields survive and which do not.
- The Three Invisible Bytes at the Start of Your CSVYour CSV has a column called `id`. Your code looks for a column called `id`. It is not there. Print the header and it says `id`. The problem is three bytes at the very start of the file that no editor displays, that Excel on Windows once needed, and that half the software in the world now has to work around.