Excel turns long numbers into scientific notation, such as 1.23E+15, because it reads them as numbers and, in General format, shows large numbers in that short form. If the number has 15 digits or fewer, this is only a display issue and you can fix it with a number format. If it has 16 or more digits, Excel has already changed the value: every digit after the 15th is now zero. To keep long IDs exactly, they must arrive in Excel as text. Our free CSV to Excel converter does that automatically for any value of 16 or more characters.
Two different problems that look the same
| What you see | What really happened | Can you undo it in the sheet? |
|---|---|---|
1.23457E+11 for a 12 digit ID | Display only: the full value is stored | Yes, change the number format |
4.11111E+15, and the last digit has become 0 | The value was cut to 15 significant digits | No, go back to the original file |
Microsoft documents both behaviours on its page about keeping leading zeros and large numbers: Excel "has a maximum precision of 15 significant digits", and for numbers with 16 or more digits, "any numbers past the 15th digit are rounded down to zero."
Values that are commonly hit:
- order and transaction IDs from payment and e-commerce systems;
- product barcodes and long SKUs;
- tracking numbers;
- account or card numbers in finance exports (treat those files with care);
- IDs from social and messaging platforms, which are often 18 or 19 digits.
Fix 1: if the digits are still there, change the format
For values of 15 digits or fewer that just display as E+:
- Select the column.
- Press Ctrl+1 (on a Mac, Cmd+1) to open Format Cells.
- Choose Number and set decimal places to 0. Or choose Custom and type
0. - Widen the column if you see
#####.
That changes only how the value looks. Sorting, lookups and formulas used the full value all along.
Fix 2: if digits were lost, go back to the source
Once a 16+ digit value has been read as a number, the original digits are gone from that sheet. Formatting will show you the zeros, not the real digits. The original CSV still has them, so:
- Close the sheet without saving over the CSV.
- Open the CSV again using one of the methods below, so the column arrives as text.
If someone already saved the damaged sheet back to CSV, the zeros are now in the file too, and you need a fresh export from the system it came from.
Method A: convert the CSV in your browser
- Open the CSV to Excel converter and drop in the CSV (up to 50 MB).
- Check the preview: long IDs show every digit.
- Decide on the "Save numbers as numbers (Excel and JSON). Leading zeros are always kept." option: - Ticked (default): values of 16 or more characters stay text, values that start with 0 stay text, and other plain numbers become real numbers. A 12 digit ID becomes a number, which is safe (no digits lost) but may display as
E+until you format the column. - Unticked: every value is saved as text. Choose this when the file is mostly IDs and codes and you do not need to sum anything. - Click Download Excel.
The rule, exactly: a value is saved as a number only if it is a plain number (digits, an optional minus sign, decimals and thousands commas), is shorter than 16 characters, and does not start with a zero followed by another digit.
Method B: import inside Excel with the column set to Text
- In a blank workbook, go to Data > From Text/CSV and pick the file.
- Click Transform Data to open Power Query.
- Select each long ID column and set its data type to Text.
- Click Close & Load.
This is Microsoft's own recommended route for imports. You have to choose the type for each affected column every time you import a new file.
Method C: typing values by hand
When you type a long number into a cell, either format the column as Text first, or type an apostrophe before the number: '4111111111111111. The apostrophe does not appear in the cell; it only tells Excel to keep the value as text. Formatting the column as Text afterwards does not change values already entered.
Prevent it in files you send
If you produce CSV files that others open in Excel:
- send an .xlsx file instead, with ID columns stored as text, when the reader uses Excel;
- or keep sending CSV but tell readers to import it, not double-click it;
- for files going into code or an API, use JSON: our CSV to JSON converter keeps 16+ character values and codes with leading zeros as strings.
The same "Excel guesses the type" behaviour also strips leading zeros from codes such as 00123. That has its own guide: how to convert CSV to Excel and keep leading zeros. If accented characters break at the same time, see fixing CSV encoding.
A two-minute check before you trust the file
- Pick three IDs from the original CSV, opened in a text editor.
- Search for them in the converted workbook.
- If all three are found with every digit, the column arrived as text or within 15 digits.
More free tools for cleaning files are on the tools page.
Frequently asked questions
Why does Excel show my number as 1.23E+15?
When a column is in General format, Excel can display large numbers in scientific notation. That part is only display: format the column as Number with no decimals and the digits come back, as long as the number has 15 digits or fewer.
Why did the last digits of my ID turn into zeros?
Excel stores at most 15 significant digits in a number. When a value with 16 or more digits is read as a number, every digit after the 15th becomes zero, and that cannot be undone in the sheet.
How do I open a CSV with long IDs without losing digits?
Import it with the ID column set to Text, or convert the CSV to an Excel file that already stores those IDs as text. Do not double-click the CSV and then save it.
Does the free converter keep 12 digit IDs as text?
Only if you untick Save numbers as numbers. Values of 16 or more characters always stay text; shorter all-digit values are saved as numbers unless they start with a zero.
Spotted an error? Write to dealmahal.official@gmail.com.
Questions or corrections: dealmahal.official@gmail.com.