← CSV Repair & Deduper (offline browser tool)

How to convert a CSV file to Excel (.xlsx) without losing or corrupting data

The right way to turn a .csv file into a proper .xlsx workbook — and the data-corruption pitfalls (leading zeros, dates, encoding) to check for first.

Before you work through this by hand: you can check your own CSV free and see which of these problems your file actually has — duplicate rows, near-duplicates, broken quoting, encoding damage. It runs in your browser tab, nothing is uploaded, and there's no signup or email.

The simple way: open and "Save As"

Opening a CSV in Excel and choosing File → Save As → Excel Workbook (.xlsx) is the most common approach, but it applies Excel's automatic type-guessing to every column on the way in — which is exactly what causes the leading-zero and date-corruption problems covered in our other guides. Do this only after checking those columns first.

The safer way: import with explicit column types

Use Data → From Text/CSV instead of double-clicking the file. This import dialog lets you set each column's type (Text, Date, Number) explicitly before the data loads, which avoids Excel silently reinterpreting IDs, zip codes, or dates. Then save the result as .xlsx.

Doing it with a script instead

import pandas as pd; df = pd.read_csv('file.csv', dtype=str); df.to_excel('file.xlsx', index=False) — reading every column as a string (dtype=str) first prevents pandas from guessing types too, then you can convert specific columns afterward if you actually want them numeric or date-typed.

Before converting, do a cleanup pass

Since .xlsx is usually the final destination, it's worth running through our CSV cleanup checklist first — duplicates, encoding, and blank rows are all easier to fix while the data is still in plain CSV than after it's inside a workbook with formatting applied.

$19 one-time payment. No subscription. If you'd rather skip the manual steps above, CSV Repair & Deduper (offline browser tool) automates the duplicate-finding and review step for you, entirely on your own device.

See CSV Repair & Deduper (offline browser tool) — $19 one-time

See all free guides