A CSV file that looks right on your screen can open as a mess on someone else’s: the file is the same, and their computer makes different guesses about it. These are nine checks for the sender. Where we could run a test, the result from Excel 2024 on US settings is shown. Points 1, 3 and 9 come from advice and from the RFC, and say so.
The checklist
- Know who opens it: a person in Excel, or a program.
- Encoding: UTF-8 with a byte order mark if a person opens it in Excel and it has accents; UTF-8 without one if a program reads it.
- One header row at the top, no title rows, no totals.
- Quotes around values that contain commas, quotes or line breaks.
- Dates written as 2026-11-29.
- Numbers with a decimal point and no thousands mark.
- IDs, zip codes and long numbers: send an .xlsx, or tell the reader how to import them.
- Never open the CSV in Excel and save it again.
- Look at the file as plain text first, then in Excel.
1. Know who opens it (advice)
If a program reads the file, a comma, UTF-8 and a header row are the usual defaults. If a person opens it in Excel, the person’s regional settings decide how it is split: a semicolon file opened on US settings is not split at the semicolons, as shown in why a CSV opens in one column. When you cannot know the reader’s settings, send an .xlsx file as well. The comparison of CSV and XLSX says when that is the better choice.
2. Encoding
We wrote a file with Zürich and Björn in it, once as plain UTF-8 and once as UTF-8 with a byte order mark, three bytes at the start of the file. Excel read the second one correctly. From the first it showed Zürich and Björn.
| File | First bytes | Excel showed |
|---|---|---|
| UTF-8, no byte order mark | 6E 61 6D (the letters “nam”) | Zürich, Björn |
| UTF-8 with byte order mark | EF BB BF | Zürich, Björn |
Excel’s own CSV UTF-8 file type (file format 62 in its automation interface) writes that mark: we saved a file that way and the first three bytes were EF BB BF. The Unicode FAQ describes the mark in UTF-8 as only a signature that tells a program the file is UTF-8, with nothing to do with byte order, and notes that some recipients of UTF-8 data do not expect it (Unicode FAQ, checked 29 November 2026). That is why the checklist makes it conditional: in our test Excel needed the mark to recognize UTF-8, and a program that does not expect it may treat the three bytes as data.
3. One header row (from the RFC, not tested)
Names in the first row, one table below it. RFC 4180 calls the header optional and says a reader can be told whether it is there with a header parameter. A file by itself cannot say so, so keep the layout plain and tell the reader that the first row holds names.
4. Quote values that contain commas, quotes or line breaks
RFC 4180 says fields that contain line breaks, double quotes or commas should be enclosed in double quotes, and that a double quote inside a field is written as two double quotes. We tried it in Excel on a file with four notes. "gift wrap, no receipt" stayed in one cell. "5"" tray" came out as 5" tray. A note with a line break inside quotes stayed in one cell, with the line break kept. The same note written without quotes, gift wrap, no receipt, was split into two cells. Check the notes and address columns first: they are the ones that tend to hold commas, quotes and line breaks.
5. Dates
Write year, month, day with hyphens: 2026-11-29. In our test Excel on US settings read 2020-01-05 as a date and showed it as 1/5/2020, and it also read the slash form 2020/1/5. A date with a time, 2026-11-24 10:30:00, became a date and time, and showed as ######### at the default column width. Short forms such as 10-12 or 1/2 are read as 12 October and 2 January on US settings, and day-first settings may read them differently; see why Excel turns text into dates.
6. Numbers
In a comma-separated file, write 1234.50. We opened quoted values on US settings: "1,234.50" became the number 1234.5, but "24,95", "3,50" and "1.013,50" stayed text, and a column of text cannot be summed. The full table is in why a CSV opens in one column. If your readers use a decimal comma, either use the semicolon and tell them, or send an .xlsx file with real numbers in it.
7. IDs, zip codes and long numbers
A CSV file has no way to say “this column is text”. We tried the usual tricks with the zip code 02134 and the 19-digit number 4301982756102931847, on US settings:
| In the CSV file | Excel showed |
|---|---|
| “02134” | 2134 (quotes do nothing) |
| ‘02134 | ‘02134 (the apostrophe stays in the cell) |
| =”02134″ | 02134 (works, as a formula) |
| “4301982756102931847” | 4.3E+18 |
| =”4301982756102931847″ | 4301982756102931847 (works, as a formula) |
The equals-and-quotes form works in Excel because Excel runs it as a formula. We did not test other programs, but any program that does not run formulas will show the text ="02134" as it is. It also puts a formula in a data file. The OWASP page on CSV injection (checked 29 November 2026) warns about cells that begin with an equals sign, a plus sign, a minus sign or an at sign, which Excel can run as formulas, and says to take care with any file built from data that users typed. So do not use the form for data that came from outside.
Three options keep the value: send an .xlsx file with those columns stored as text; tell the reader to import the file with Data, From Text/CSV and set the column to Text (the steps are from Microsoft’s page and are in why Excel turns long CSV numbers into E+18; we did not click through them); or make the Excel file with the CSV viewer on this site, which reads your CSV as text and stores the columns it marks as text.
8. Never open the CSV in Excel and save it again
We opened a CSV in Excel and saved it as CSV with no edits: 4301982756102931847 came back as 4.30198E+18, 5901234123457 as 5.90123E+12, 02134 as 2134, 0012345678905 as 12345678905 and 10-12 as 12-Oct. The details are in the post on long numbers. Produce the CSV from the source system and leave it alone. If you have to edit one, work on a copy and check the result in a viewer, not in Excel.
9. Look at the file the way your reader will (advice, partly tested)
Before you send, open it twice: once as plain text, to see what is really in the file, and once in Excel with your own settings, as a stand-in for the reader. In plain text, look at the first rows and the last row, and check that every row has the same number of values. If a file is close to a million rows, count them: Excel loaded 1,048,576 rows and dropped the rest when we gave it one row too many.
The CSV viewer on this site is one way to do the first look. It shows which separator, encoding and decimal mark it found, marks the common cases that Excel would change, and lets you change each guess to see the table again.

How we tested
Every Excel result above is from Excel 2024 (version 16.0, build 20625) on Windows 11 with US settings, on 24 and 29 November 2026, with made-up files. Points 1, 3 and 9 are advice, with the RFC and our tests behind them where linked. We did not test Excel with other regional settings, Excel for Mac or the web, Google Sheets or LibreOffice. How we test says more.
Sources
All checked on 29 November 2026.
- IETF, RFC 4180, Common Format and MIME Type for CSV Files (October 2005, Informational).
- Unicode Consortium, Unicode FAQ: UTF-8, UTF-16, UTF-32 and BOM.
- OWASP Community, CSV Injection.



