Convert Windows-1250 and ISO-8859-2 to UTF-8

Did you get a file from a Polish customer, colleague or legacy system, and it shows only � on your Mac, in Linux or in your code editor? It's most likely saved in Windows-1250 (cp1250) or ISO-8859-2 (Latin-2). Drag it here. Mojibuster detects the encoding 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

  • Exports from Polish accounting software, online banking or ERP systems come in Windows-1250, but your system only accepts UTF-8.
  • Old websites, mail archives and log files from Poland or Central Europe are stored in ISO-8859-2.
  • A colleague saved a file as "ANSI" in Notepad on a Polish Windows PC, and your editor or tool expects UTF-8.
  • Older versions of Polish programs such as Subiekt GT or Comarch Optima, and various payroll and banking systems, may export files in Windows-1250.
Polish text in Windows-1250 opened with Western settings

Garbled

Za¿ó³æ gêœl¹ jaŸñ
ulica Piêkna 5, Kraków

After conversion

Zażółć gęślą jaźń
ulica Piękna 5, Kraków

How to convert the file

  1. Drag the file into the box above.
  2. Mojibuster detects Windows-1250, ISO-8859-2 and UTF-8 on its own. The result shows which encoding it used to read the file.
  3. If the preview looks wrong, read the file again with one click on Read as ….
  4. Click Download to save the file as UTF-8.

Detection is tuned for Polish text. Czech, Slovak, Hungarian, Slovenian and Croatian files use the same code pages, but other letters. If such a file looks wrong, choose another reading with Read as ….

Windows-1250 vs. ISO-8859-2

The two code pages differ in just a few Polish letters: ą, ś, ź (and their capitals) sit at different byte values. That's why a file read with the wrong one looks almost fine – only these letters turn into ±, or Ľ. Mojibuster compares both readings and picks the one that produces Polish words.

Polish letters and their bytes

  • ą – Windows-1250 B9, ISO-8859-2 B1, UTF-8 C4 85. Broken forms: Ä… and ¹.
  • ś – Windows-1250 9C, ISO-8859-2 B6, UTF-8 C5 9B. Broken forms: Ĺ› and œ.
  • ź – Windows-1250 9F, ISO-8859-2 BC, UTF-8 C5 BA. Broken forms: Ĺş and Ÿ.
  • ł – byte B3 in both code pages, UTF-8 C5 82. Broken forms: Ĺ‚ and ³.
  • ż – byte BF in both code pages, UTF-8 C5 BC. Broken forms: ĹĽ and ¿.

The opposite mix-up is worse: a Windows-1250 file read as ISO-8859-2 turns ą into š, and ś and ź disappear completely, because bytes 9C and 9F are invisible control characters in ISO-8859-2. The original file is still fine, though – just drag it here.

Characters that have already turned into ? can't be recovered – the information was lost when the file was saved. Mojibuster shows how many there are. How these errors happen is explained in What is mojibake.

Converting on the command line

For many files, the command line is handy. On Linux and Mac: iconv -f WINDOWS-1250 -t UTF-8 old.txt > new.txt. In PowerShell 7: Get-Content old.txt -Encoding 1250 | Set-Content new.txt -Encoding utf8BOM (saves UTF-8 with a BOM, which Excel needs). On an English Windows PC, -Encoding Default in Windows PowerShell 5.1 means Windows-1252, not Windows-1250, so it won't work here.

These commands convert blindly. If the file was already UTF-8, you get garbled text like Ä…. Mojibuster detects the encoding first and leaves files that are already UTF-8 alone.

Frequently asked questions

How can I tell which encoding a file uses?

Mojibuster shows it after loading the file. A quick hint: ¹ and ³ instead of ą and ł mean Windows-1250 read as Western text, ± instead of ą means ISO-8859-2 read as Windows-1250, and Ä… instead of ą means UTF-8 read as Windows-1250. And %C4%85 is a URL code, not garbled text.

Does this work for Czech, Slovak or Hungarian files?

These languages use the same code pages, but detection is tuned for Polish. If the preview looks wrong, click Read as … and choose another reading.

Will the converted file open correctly in Excel?

Yes. For CSV files, keep Save with BOM switched on – then Excel opens the file without broken characters. More tips: broken characters in Excel.

Can I convert back from UTF-8 to Windows-1250?

Not yet – files are saved as UTF-8 only. If you need Windows-1250, save the file again in Excel or a text editor.

Is my file uploaded to a server?

No. The conversion runs entirely in your browser.

More guides