Convert ANSI to UTF-8

Have a file in ANSI, Windows-1252 or ISO-8859-1 and need it in UTF-8? Drop it into the box above: Mojibuster detects the encoding, shows you the accented characters to check and saves the file as UTF-8.

Works with text and these files:

  • CSV
  • TXT
  • JSON
  • XML
  • SRT
  • VTT
  • SMI
  • TSV
  • MD
  • HTML
  • SQL
  • LOG

For example Excel exports, database dumps, subtitles or website code.

Repair

  1. Drop a file or paste text
  2. It gets repaired automatically
  3. Copy or download
or simply drag a file here

When you need this

  • A CSV export from older accounting software, an ERP or online banking is saved in ANSI, and the new system or shop import expects UTF-8.
  • A text file from an older Windows program shows caf� instead of café on a Mac, on Linux or in Git.
  • A website, a database or a script reads the file as UTF-8 and fails at the first accented letter.
  • Old subtitle files show boxes instead of accents on the TV – there is a separate guide for that: fix subtitle encoding.

How to convert the file

  1. Drag the file into the box above or click to choose it.
  2. Mojibuster reads it and tells you how: “Read as Windows-1252 (ANSI), saved as UTF-8.”
  3. Check the preview. If something looks wrong, Mojibuster offers another reading with one click.
  4. Click Download. If Excel is going to open the file, keep Save with BOM ticked.

What “ANSI” actually means

“ANSI” is the name Windows uses for the system's legacy code page. On English and Western European Windows it is Windows-1252. It has nothing to do with the American National Standards Institute – the name is a historical misnomer. ISO-8859-1 (Latin-1) is almost the same: only between bytes 80 and 9F does Windows-1252 add characters such as €, “, ’ and –.

The difference in bytes

  • é – ANSI E9 (one byte), UTF-8 C3 A9 (two bytes).
  • £ – ANSI A3, UTF-8 C2 A3.
  • € – Windows-1252 80, missing from ISO-8859-1, UTF-8 E2 82 AC.
  • ’ – Windows-1252 92, UTF-8 E2 80 99.
  • Plain letters, digits and punctuation such as , are the same in all three encodings. That's why the problem only shows up in accents, currency signs and curly quotes.

How to recognise an ANSI file

When an ANSI file is opened as UTF-8, the byte of an accented letter is invalid there. Programs show �, Notepad++ shows small boxes like xE9. The correct byte is still in the file, so nothing is lost when you convert it. Whether a ? is already stored permanently is explained in question marks instead of characters.

The opposite case: UTF-8 read as ANSI

If you see é instead of é, the file is already UTF-8 and is only being read as ANSI – usually by Excel. Then there is nothing to convert: open the file correctly or repair the stored garbage, see Excel special characters and fix UTF-8 characters. Mojibuster detects this case too.

UTF-8 file opened as ANSI

Shown

Café résumé: naïve façade, £12 – done

Correct

Café résumé: naïve façade, £12 – done

Other ways

  • Excel: open the file, then File → Save As → file type CSV UTF-8 (Comma delimited). Check first that the accents look right after opening.
  • Notepad++: in the Encoding menu choose ANSI first, then Convert to UTF-8 – step by step in Notepad++ encoding.
  • PowerShell and Python: name the old encoding when reading, or you create new garbage. See PowerShell and pandas.

Frequently asked questions

Are characters lost when converting?

No. Every character of Windows-1252 and ISO-8859-1 exists in UTF-8. Only characters that were already saved as ? stay ?.

Is ANSI the same as ISO-8859-1 or Latin-1?

Almost. Windows-1252 also has €, curly quotes and dashes. Mojibuster reads both correctly, because Windows-1252 contains every character of ISO-8859-1.

UTF-8 with or without BOM?

With BOM for Excel, otherwise Excel shows é again. Without BOM for websites, databases and source code.

Is my file uploaded?

No. The conversion runs entirely in your browser, even for large CSV exports. The file never leaves your device.

More guides