Excel’s standard "Save As" CSV options always include a Byte Order Mark, which breaks many parsers. To save a CSV as UTF-8 without BOM via the GUI, you must use the Notepad workaround: open the file in Notepad, save it with the specific encoding, and then reopen it in Excel. This method bypasses Excel’s default behavior while preserving your data integrity.
The Problem with Excel's Default CSV Encoding
When you choose
File > Save As and select
CSV (Comma delimited) (*.csv) or
CSV UTF-8 (Comma delimited) (*.csv), Microsoft Excel automatically prepends a three-byte sequence at the very beginning of the file. This sequence is known as the Byte Order Mark (BOM), represented in hexadecimal as
EF BB BF. While some applications handle this gracefully, many command-line tools, Python scripts, and strict JSON parsers fail when they encounter unexpected characters at the start of a text stream.
The issue stems from how Excel manages character sets internally. It uses the system's default ANSI code page for legacy formats and UTF-16LE for its internal representation. When exporting to UTF-8, Excel adds the BOM to signal to readers that the file is UTF-8 encoded. However, if your downstream process expects a clean UTF-8 stream without this marker, the export fails silently or causes parsing errors. You might notice symptoms like garbled characters in terminal outputs or errors such as "Invalid UTF-8 sequence" in development environments.
Step-by-Step: The Notepad Workaround
The most reliable way to achieve a UTF-8 without BOM export using only graphical user interfaces is to leverage Windows Notepad. Notepad allows explicit selection of encoding types during the save process, including the precise variant you need. Follow these steps carefully to ensure your data remains intact.
- Open the File in Notepad: Right-click your existing CSV file in File Explorer. Select Open with and choose Notepad. Do not double-click the file, as it may open in Excel again. If you do not see Notepad, click "Choose another app" and locate it.
- Verify Data Integrity: Once opened, check that all special characters, accents, and non-Latin symbols display correctly. If they appear as squares or question marks, the original file was likely saved in an incorrect encoding (such as ANSI or ISO-8859-1). In that case, you must fix the source encoding first before proceeding.
- Initiate the Save Process: Click File in the top-left corner, then select Save As.
- Select the Destination: Choose the folder where you want to save the new file. Give it a new name to avoid overwriting the original BOM-enabled version immediately, though you can overwrite it later if desired.
- Choose the Correct Encoding: This is the critical step. At the bottom of the Save dialog, look for the dropdown labeled Encoding. If you do not see this dropdown, ensure you are selecting All Files (*.*) or Text Documents (*.txt) in the "Save as type" field. Change the dropdown from the default (usually ANSI or UTF-8 with BOM) to UTF-8. Note that in older versions of Windows 10/11, this option might be labeled simply as "UTF-8".
- Save and Verify: Click Save. You now have a file without the BOM header.
Reopening the Clean CSV in Excel
After saving the file via Notepad, you will likely want to view or edit it in Excel again. Simply double-clicking the new file may cause Excel to re-import it incorrectly, potentially adding quotes around fields or misinterpreting dates. To ensure Excel reads the UTF-8 without BOM file correctly, use the
Data tab.
Navigate to
Data > Get Data > From File > From Text/CSV. Browse to your newly saved file. In the preview window, verify that the
File Origin is set to
65001: Unicode (UTF-8). If it is set to something else, change it manually. Click
Load. This method ensures that Excel treats the file as a pure text stream rather than trying to guess the encoding based on the missing BOM. This approach is particularly useful when dealing with international characters that were previously corrupted.
For more complex scenarios involving large datasets or automated workflows, consider exploring how to handle encoding issues in virtualized environments, as seen in our guide on
Cannot Save CSV File in Excel (Windows 11, MS Office Home Business 2019) in WSL2 Folder. Virtual machines often have different default encodings, making manual conversion even more critical.
Alternative GUI Methods: Using Word
If you do not have access to Notepad or prefer using Microsoft Word, you can achieve similar results. Open the CSV file in Word. Word usually detects the comma delimiters and presents them in a wizard-like interface. After opening, go to
File > Save As. In the "Save as type" dropdown, select
Plain Text (*.txt). Click
Save. A prompt will appear asking if you want to save line endings as CRLF or LF. Choose your preference, and then ask if you want to convert any Word-specific formatting. Confirm the encoding when prompted by choosing
UTF-8. Rename the resulting
.txt file to
.csv. This method is slightly more cumbersome but works reliably across different versions of Microsoft Office.
Why Avoid Third-Party Tools?
While there are numerous third-party utilities and online converters that claim to strip BOMs, using built-in OS tools is safer for sensitive data. Third-party tools may introduce their own encoding assumptions or require internet connectivity for cloud-based converters, which poses a security risk for confidential business data. The Notepad method requires no installation, no network connection, and provides immediate visual feedback on character correctness. It is the most transparent method for ensuring that no hidden metadata or encoding layers are added inadvertently.
Frequently Asked Questions
How do I know if my CSV has a BOM?
You can check by opening the file in a hex editor or using the command line. Run
xxd -l 3 filename.csv in Linux/macOS or
certutil -hex filename.csv in Windows. If the first three bytes are
ef bb bf, the BOM is present. Visually, you cannot see it, but programs reading the file will encounter it as invisible garbage data at the start.
Does Excel automatically remove the BOM when editing?
No. If you open a BOM-less CSV in Excel and save it using the standard CSV format, Excel will add the BOM back upon saving. You must repeat the Notepad export process every time you modify the file and need to maintain the BOM-less state. There is no native checkbox in Excel to disable this behavior permanently.
Can I use PowerShell to remove the BOM?
Yes, PowerShell is an excellent alternative if you prefer scripting over GUI steps. Use the command
[System.IO.File]::WriteAllText("output.csv", [System.IO.File]::ReadAllText("input.csv"), [System.Text.UTF8Encoding]::new($false)). The
$false parameter explicitly tells .NET not to include the preamble (BOM). This is faster for bulk processing multiple files.
What happens if I open a UTF-8 without BOM file in old Excel versions?
Older versions of Excel (pre-2016) may struggle to detect the encoding correctly, leading to mojibake (garbled text) where special characters turn into random symbols. Always specify the encoding during import via the
Data > From Text/CSV wizard in these older versions to ensure proper rendering of international characters.
Is the BOM harmful for web browsers?
Generally, no. Modern web browsers are highly tolerant of BOMs in HTML and CSS files. However, for JavaScript and JSON files, a BOM can sometimes cause syntax errors because the parser expects the first character to be a valid token (like
{ or
function). It is best practice to strip BOMs from any text file intended for programmatic consumption.