File Conversion

UTF-8 Encoding in CSV Files: No More Broken Accents

Why strange characters like é or ’ show up in your CSV files, what UTF-8 and the BOM are, and how to avoid encoding problems for good.

UTF-8 Encoding in CSV Files: No More Broken Accents

You open a CSV file and instead of “José” you see “José”. Instead of “don’t” you get “don’t”. If this has ever happened to you, you are not alone: it is one of the most common problems when working with data that includes accented letters, curly quotes or symbols from other languages. The good news is that it has a simple explanation and a permanent fix.

What character encoding is

A computer does not store letters, it stores numbers. Encoding is the table that says which number corresponds to each character. The problem is that many different tables have been created over the years:

  • ASCII: only 128 characters, with no accents or special symbols.
  • Windows-1252 (ANSI) and ISO-8859-1 (Latin-1): add the characters of Western European languages.
  • UTF-8: can represent any character in any language, including emojis, and is the standard of the internet.

When a file is saved with one encoding and opened with another, the program interprets the numbers with the wrong table and those strange characters appear.

Why “é” appears instead of “é”

In UTF-8, the letter “é” is stored using two bytes. If a program reads the file thinking it is Windows-1252, it treats each byte as a separate character: the first shows up as “Ô and the second as “©”. That is why this pattern, an “Ô followed by another symbol, is the telltale sign of a UTF-8 file opened with the wrong encoding. Curly apostrophes and quotes produce the “’” and ““” patterns for the same reason.

The opposite also happens: a file saved in Windows-1252 and read as UTF-8 shows a question mark or a diamond (�) instead of the accented letter.

What the BOM is

The BOM (*Byte Order Mark*) is a small invisible three-byte marker placed at the start of a file to say it is UTF-8. Excel uses it to recognize the encoding automatically when opening a CSV.

  • With BOM: Excel opens the file correctly on double click. Some systems (scripts, databases, certain import platforms) may show odd characters at the start of the first column, such as code.
  • Without BOM: most systems read it perfectly, but Excel may open it with the wrong encoding.

Rule of thumb: if the CSV is meant to be opened in Excel, use UTF-8 with BOM. If it is meant to be imported into another system, check its documentation; in general, UTF-8 without BOM is the most compatible.

How to avoid the problem when creating a CSV

  1. Always save as UTF-8. In Excel, choose “CSV UTF-8 (Comma delimited)”.
  2. Use a tool that lets you choose the encoding. With the Excel to CSV converter on our Excel tools page you can produce CSV files ready for the target system.
  3. Check the result in a text editor such as Notepad or Visual Studio Code, which show the encoding in the status bar.

How to fix a CSV that already looks wrong

If you receive a CSV with strange characters, do not save it after opening it, or you may lock the error in. Instead:

  1. In Excel, use Data > Get Data > From Text/CSV.
  2. Under “File Origin”, try 65001: Unicode (UTF-8). If it still looks wrong, try 1252: Western European (Windows).
  3. When the preview shows the accents correctly, load the data.

Another option is to convert the CSV with the CSV to Excel converter on our tools page, which detects the encoding automatically and produces an XLSX file where accents already display correctly.

When the damage is permanent

If someone opened the CSV with the wrong encoding and saved it, the incorrect characters have become real text. In that case you will need Find and Replace to fix the most common patterns:

Looks likeShould be
áá
éé
óó
ññ
’’
““

It is a tedious process, so it is always better to keep the original file untouched.

Good practices for teams

  • Agree on a single encoding: UTF-8 for everything.
  • Document the delimiter: comma or semicolon, but always the same one.
  • Do not edit CSV files directly in Excel if they will be imported into another system; work in XLSX and export at the end.
  • Name files without accents or spaces to avoid problems on servers and in scripts: customers_september.csv rather than Customers Sept é.csv.

Frequently asked questions

How can I tell which encoding a file uses?

Open it in a text editor like Notepad++ or Visual Studio Code: both show the encoding in the bottom bar and let you convert it. If you see the “Ô pattern followed by another symbol, it is almost certainly UTF-8 read as Windows-1252.

Does UTF-8 work for every language?

Yes. UTF-8 can represent every Unicode character, from Spanish and Portuguese to Chinese, Arabic or emojis. That is why it is the recommended standard for any data file.

Why does my online store reject the CSV?

Many platforms require UTF-8 and a specific delimiter. If the file was saved in another encoding, the import may fail or store product names with strange characters. Regenerate the CSV as UTF-8 and try again.

Can the BOM cause errors?

Yes, in some systems. If the first column of your import shows up with an odd name, like code, the system does not recognize the BOM. Save the file as UTF-8 without BOM.

Conclusion

Strange characters in a CSV are not a mystery: they are the result of opening a file with a different encoding from the one used to save it. Always use UTF-8, decide whether you need a BOM based on the destination and open CSV files with the import wizard or a tool that detects the encoding. With these habits, your accented letters and symbols will always arrive intact. Find all our converters on the Excel tools page.

Try our free tools

Compare, convert, merge and clean your spreadsheets right in your browser, with nothing to install.

See all tools
Scroll to Top