Convert CSV to Excel (XLSX) without losing leading zeros
Drop a .csv file below and download an Excel .xlsx workbook. Fileshape detects the delimiter (comma, semicolon or tab), writes plain numbers as real Excel numbers, and keeps codes like 00123, phone numbers and long IDs as text so Excel can't strip their zeros or turn them into 1.23E+15. It runs in your browser.
Drop a file to convert
CSV, Excel, JSON, XML and more. It stays on your device; nothing is uploaded.
Why opening a CSV directly in Excel goes wrong
Double-clicking a CSV makes Excel guess every column's type. Postal codes and product codes such as 00123 lose their leading zeros, 16-digit references and barcodes are shown in scientific notation and their last digits are rounded away, and anything that looks like a date (3-4, 1/2) is turned into one. If your regional settings use a comma as the decimal separator, a comma-delimited file can also open as a single column.
Converting to .xlsx first avoids the guessing, because the workbook stores each cell's type explicitly. Fileshape decides per cell: a plain decimal number such as 1204.5 or -42 becomes a numeric cell (with its decimal places kept), while values with leading zeros, a plus sign, thousands separators or more than 11 digits are written as text, exactly as they appeared in the CSV.
Delimiters, encodings and header rows
The delimiter is detected automatically, so comma, semicolon and tab-separated files all work; you can override it if the detection picks the wrong one. Files are read as UTF-8, so ₹, é and non-Latin text come through. Exports that start with a few title lines above the real header (common in bank and ERP reports) are handled by the header detector, which finds the row that looks like column names; you can also set the header row yourself.
In the mapping step you can rename, reorder or drop columns before writing the workbook, and add transforms such as a date format if the next system expects YYYY-MM-DD. The result is a single-sheet workbook named Sheet1.
Large CSV files
An Excel worksheet holds at most 1,048,576 rows, so a CSV with more rows than that can't fit on one sheet. Filter or split the data first, or skip Excel entirely: upload the file to Fileshape Ask AI and ask ChatGPT or Claude questions about every row. See CSV too large for Excel for the options.
Ask AI about this file
Ask ChatGPT, Claude or Cursor about your file. Fileshape cleans it, masks personal columns and gives your AI one link, so totals come from every row.
FAQ
Questions
How do I convert a CSV to Excel without losing leading zeros?
Convert it to .xlsx with a tool that stores those values as text. Fileshape keeps any value with a leading zero, a plus sign or more than 11 digits as text, so 00123 and long IDs open in Excel exactly as they were.
Is the CSV uploaded anywhere?
No. The conversion runs in your browser and the file isn't uploaded.
Can I convert a semicolon-separated CSV?
Yes. The delimiter is detected automatically, and you can choose comma, semicolon or tab yourself if needed.
What's the difference between CSV and XLSX?
CSV is plain text with no types, formatting or sheets. XLSX is Excel's workbook format and stores each cell as a number, text or date, which is why converting avoids Excel's guessing.
Related
Other conversions
- Convert Excel to CSV without breaking your dataConvert an Excel workbook to clean CSV in your browser: pick the sheet, skip title rows, keep leading zeros and choose comma or semicolon delimiters.
- Convert JSON to CSV, including nested JSONConvert JSON or JSON Lines to CSV in the browser. Nested objects become dot-named columns, arrays are joined, and the record list is found automatically.
- Convert CSV to JSONTurn CSV into a JSON array of objects, nested JSON via dot-named columns, or JSON Lines. Delimiters and quoted fields detected automatically.
- Convert JSON to Excel, including nested JSONConvert JSON or JSON Lines to an Excel .xlsx file in your browser. Nested objects become columns, records are found for you and IDs keep their zeros.
Updated 2026-11-27