If you work with CSV exports from multiple systems, you’ve probably hit this odd problem: the file opens perfectly everywhere except Excel on macOS. Accented characters turn into “é”, punctuation looks mangled, and your supposedly clean UTF-8 file suddenly appears corrupted.
It happens all the time. And yet if you google the issue, it’s had to find an answer, even on reddit. The CSV is valid, properly encoded… but Excel keeps doing Excel things. So here’s the short version of what actually fixes the issue, why it happens, and how to avoid losing an afternoon to debugging data.
The strange case of Excel and UTF-8 on macOS
The CSV I downloaded looked wrong as soon as I opened it in Excel. So I checked the encoding:
brew install uchardet
uchardet file.csv
UTF-8.
Great. Well, not great, because that’s what it should be.
Then I validated the file using iconv. Still no issues. The file was fine.
So why does Excel misread it?
Because Excel for macOS can’t reliably detect UTF-8 unless the file contains a Byte Order Mark (BOM) — a tiny three-byte signature (EF BB BF) at the top of the file. Most software doesn’t need it. Excel, apparently, still does.
The fix: add a UTF-8 BOM
Once I added a BOM manually, Excel opened the file perfectly: no broken characters, all as it should be. Try this to add the BOM:
printf '\xEF\xBB\xBF' | cat - file.csv > file_bom.csv
Open the new _bom.csv version of your file and everything renders correctly. This was the only reliable fix. Import wizards, manual conversions, and “Open With…” did nothing.
Why this works
A BOM is optional in UTF-8. But Excel on macOS still uses it as a hint. Without it, Excel often guesses the wrong encoding and displays whatever its internal fallback thinks is correct.
The CSV was never broken — Excel just made the wrong assumption.
Making it repeatable
If you do this often, add a helper to your shell:
fix_excel_csv() {
printf '\xEF\xBB\xBF' | cat - "$1" > "${1%.csv}_bom.csv"
}
Run it like:
fix_excel_csv export.csv
You get a _bom.csv version that Excel will open reliably every time.
If you’re exporting from Python
Just declare the encoding using utf-8-sig:
with open("output.csv", "w", encoding="utf-8-sig", newline="") as f:
writer = csv.writer(f)
writer.writerow(["name", "title"])
writer.writerow(["René", "Director"])
That automatically includes the BOM and Excel starts to behave.
Final thoughts
If Excel on macOS ever shows mangled characters in an otherwise valid UTF-8 CSV, don’t waste time re-encoding, converting, or debugging the source system. The simplest, most consistent fix is:
Add a UTF-8 BOM — not a new encoding.
This tiny three-byte marker is the difference between “é” and “é”. And once you know this quirk, you’ll never debug the wrong thing again.

Leave a Reply