CSV to Excel
Turn a CSV into an Excel .xlsx file that keeps leading zeros, long numbers and codes as written. Nothing is uploaded.
CSV input
Options
The CSV is read and the .xlsx written in this tab, by the page's own code. Nothing is uploaded.
The workbook
- Pasted text · comma-delimited · numbers like 1,234.56 · 4 rows × 8 columns → sheet “Sheet1”
5 numbers · 3 dates · 24 text values
Kept as written: 14 values that opening the CSV in Excel would change
- 4 values whose leading zeros Excel drops, such as
00417in A2 - 3 values of more than 15 digits, which Excel cuts to 15, such as
9400111899223197428490in D2 - 3 values whose leading + Excel drops, such as
+14155550123in C2 - 3 values that Excel turns into a date or a time, such as
MARCH1in E2 - 1 value that Excel runs as a formula, such as
=SUM(F2:F4)in H4
| Row | A | B | C | D | E | F | G | H |
|---|---|---|---|---|---|---|---|---|
| 1 | order_id | zip | phone | tracking | sku | amount | ordered | note |
| 2 | 00417 | 02134 | +14155550123 | 9400111899223197428490 | MARCH1 | 12.50 | 2025-01-31 | Gift wrap |
| 3 | 00418 | 10001 | +442071838750 | 9400111899223197428491 | SEPT2 | 1250.00 | 2025-02-01 14:30 | Leave at the door, ring twice |
| 4 | 00419 | 94103 | +919820012345 | 9400111899223197428492 | 1-2 | 3 | 2025-02-03 | =SUM(F2:F4) |
A CSV to Excel converter that keeps what the CSV says
Opening a CSV in Excel is a conversion too, and it changes values. Measured with Excel 16.0 on Windows in US English, opening a CSV turns 00123 into 123, stores the 16-digit card number 4111111111111111 to 15 digits and shows it as 4.11E+15, turns MARCH1 and 1-2 into dates, drops the plus of +14155550123, runs =1+1 as a formula, and reads a UTF-8 file without a byte order mark as Windows-1252, so café becomes café.
This page writes the .xlsx itself, so none of that happens. A value becomes a number only when it is a plain decimal of at most 15 significant digits, the most Excel keeps, and its cell shows it as the CSV wrote it: its decimals, its thousands separators, and every digit of a long integer. A value becomes a date only when it is an ISO date such as 2025-01-31, which cannot be misread. Everything else is a text cell, which Excel never reads as a number, a date or a formula, with the Text format so that editing it keeps it text.
The first row can be a header: bold, frozen, with a filter. Several CSV files become one workbook, a sheet each, and a file longer than a sheet's 1,048,576 rows goes on in another sheet with its header again. The file is read as UTF-8, UTF-16 or, when it is not valid UTF-8, as Windows-1252, the encoding Excel itself saves CSV in. To clean a CSV first, or to turn it into JSON instead, try the CSV cleaner or CSV to JSON.
What this tool is used for
- Sending a customer list to someone who will open it in Excel, without its ZIP codes losing their leading zeros or its phone numbers their plus signs.
- Turning a shop's order export into a workbook whose amounts add up, as they are real numbers, while its order and tracking numbers stay whole.
- Combining a month of daily CSV exports into one workbook, a sheet a day, without opening each file in Excel.
- Passing a CSV from a European system, semicolon-delimited with decimal commas, to a colleague whose Excel expects commas between values.
- Keeping product codes such as MARCH1, SEPT2 or 1-2 from becoming dates when a spreadsheet of them is shared.
- Opening an export that holds text typed by strangers, where a value starting with = would otherwise run as a formula.
How it works in practice
A worked example
A shop exports its orders as CSV for its accountant, who opens the file in Excel and finds the order numbers, ZIP codes and tracking numbers changed.
order_id,zip,tracking,sku,amount,ordered 00417,02134,9400111899223197428490,MARCH1,12.50,2025-01-31
A2 text "00417" B2 text "02134" C2 text "9400111899223197428490" D2 text "MARCH1" E2 number 12.50, format 0.00 F2 date 45688, format yyyy-mm-dd
Opened as a CSV in Excel 16.0, the same row reads 417, 2134, 9.4E+21, Mar-01 and 12.5: the zeros are gone, the tracking number is stored to 15 of its 22 digits, and the product code is the date 1 March 2001. In the workbook this page writes, those four are text cells and show as written. The amount is a number Excel can sum, with a format that keeps its two decimals, and the date is a real date, shown as 2025-01-31.
The edge case that catches people
An .xlsx keeps its text in XML, where Excel reads _x0041_ as an escape for the character A. A writer that copies a value such as _x0041_ into the file as it is loses it: measured, a cell written that way showed A, and _x00e9_ showed é. This page writes the underscore of such a value as _x005F_, so the cell shows _x0041_, and uses the escape itself only for what XML cannot hold, such as the control character U+0001, written _x0001_.
When not to use this tool
If the data is going into a database or another program, keep it as CSV, which every importer reads, and set the column types there. For a file larger than about 25 MB, or one you convert every day, a script with openpyxl or pandas, or Excel's own Data, From Text/CSV, which lets you set each column's type before the data arrives, does the job without a browser tab holding every cell. And if you need formulas, charts or styling, write them in Excel after converting.
Frequently Asked Questions
- Why does Excel remove the leading zeros from my CSV?
- Opening a CSV, Excel reads every value that looks like a number as a number, and a number has no leading zeros, so 00123 becomes 123. This converter writes an .xlsx in which 00123 is a text cell, so it stays 00123, and its Text format keeps it text if you edit it.
- Why does Excel show my long numbers as 4.11E+15?
- Excel keeps 15 significant digits. Opening a CSV, it stores the card number 4111111111111111 as 4111111111111110 and shows 4.11E+15. Here a number of more than 15 digits stays a text cell with every digit, and one of 12 to 15 digits gets the format 0, so all of it shows.
- Does the converter change my dates?
- Only ISO dates: 2025-01-31, with or without a time, becomes an Excel date shown as written. A date such as 03/04/2025 stays text, as it is 3 April or 4 March depending on who wrote it; Excel on a day-first system read it as 3 April.
- Can I combine several CSV files into one Excel workbook?
- Yes. Drop them together and each becomes a sheet named after its file, in the order you added them. A file of more than 1,048,576 rows, the most a sheet holds, goes on in a further sheet with its header row again.
- Is my CSV uploaded to a server?
- No. The page reads the file and writes the .xlsx in your browser tab, with its own JavaScript: the workbook is a ZIP of XML parts that the page builds and hands to the browser as a download. You can load the page, go offline and convert.
- Does it read semicolon CSV files with decimal commas?
- Yes. It picks the delimiter that splits the rows into the same number of columns, so 1.234,56;7,5 is two values, and reads 1.234,56 as 1234.56. Excel then shows it with the separators of the computer it is opened on.
- What happens to a value that starts with = or @?
- It stays text. Opening a CSV, Excel runs =1+1 and @SUM(1,1) as formulas, and turns -abc into a formula that shows #NAME?. In this workbook such a value is a text cell, which Excel never runs.
Common errors and gotchas
- Double-clicking the CSV, then saving it as .xlsx. Excel changed the values as it opened them, so the zeros and digits it dropped are not there to save.
- Formatting the column as Text after the CSV is open. The values were converted on opening, so 123 stays 123; the type must be set before the data arrives.
- Expecting to sum numbers of more than 15 digits in Excel. It keeps 15 significant digits, so such values can only be text there.
- Saving a UTF-8 CSV with no byte order mark for Excel. On a Western Windows it reads such a file as Windows-1252, so café shows as café.
- Reading 03/04/2025 as a date without knowing where the file came from. Day-first and month-first systems disagree, so a converter cannot know which it is.