← Back to CleanCSV

Fix CSV Encoding Issues: UTF-8, ASCII, and Special Characters

Last updated: March 2026 • 7 min read

Seeing garbled characters like "é" instead of "é"? Your CSV has an encoding problem. This guide explains why it happens and how to fix it.

Understanding CSV Encoding

Text encoding tells computers how to convert bytes into characters. The most common encodings are:

  • UTF-8: Universal standard, supports all languages
  • ASCII: English-only, 128 characters
  • Latin-1 (ISO-8859-1): Western European languages
  • Windows-1252: Microsoft's Latin-1 extension

Common Encoding Problems

1. The BOM Issue

UTF-8 files may start with a "Byte Order Mark" (BOM) — invisible characters that confuse some tools. Signs of BOM issues: first column header has weird prefix, or file won't parse correctly.

2. Wrong Encoding Detection

Opening a UTF-8 file as Latin-1 (or vice versa) produces garbage characters. Example: "José" becomes "José" or "Jos?".

How to Fix Encoding Issues

In Excel

  1. Don't double-click the CSV — use Data → From Text/CSV
  2. Select "65001: UTF-8" from the encoding dropdown
  3. Preview the data to confirm characters display correctly

In Python

import pandas as pd

# Try UTF-8 first
df = pd.read_csv('data.csv', encoding='utf-8')

# If that fails, try other encodings
df = pd.read_csv('data.csv', encoding='latin-1')
df = pd.read_csv('data.csv', encoding='cp1252')

# Auto-detect with chardet
import chardet
with open('data.csv', 'rb') as f:
    result = chardet.detect(f.read())
df = pd.read_csv('data.csv', encoding=result['encoding'])

Convert File Encoding

# Linux/Mac terminal
iconv -f WINDOWS-1252 -t UTF-8 input.csv > output.csv

# Or use Python
with open('input.csv', 'r', encoding='latin-1') as f:
    content = f.read()
with open('output.csv', 'w', encoding='utf-8') as f:
    f.write(content)

Using CleanCSV

CleanCSV automatically detects and converts encoding:

  1. Upload your CSV file
  2. The tool auto-detects the encoding
  3. Download in UTF-8 format (universal compatibility)

Fix Encoding Instantly

Upload your CSV and CleanCSV will handle encoding automatically.

Try CleanCSV Free →