Text Encoding Detector & Converter
Detect the character encoding of text or a file, fix garbled mojibake text, and convert between UTF-8, UTF-16 and Windows-1252.
Mojibake fixer
Fix it re-reads each character as a Windows-1252 byte and decodes the bytes as UTF-8 (falls back to Latin-1). Garble does the reverse so you can reproduce the problem.
Detection result
Convert & download
Re-encodes the decoded text (or your pasted text) and downloads it. Characters that do not exist in the target encoding are replaced with ?.
Seeing Café where you expected Café, or ’ instead of an apostrophe? That is mojibake: text written in one encoding and read in another. This tool works out which encoding a file or snippet actually uses, repairs the garbled text, and lets you re-save it in the encoding you need — without uploading anything.
What it detects
- Byte-order marks for UTF-8, UTF-16 LE/BE and UTF-32.
- UTF-8 by validating the multi-byte sequences (and plain ASCII, which is also valid UTF-8).
- UTF-16 without a BOM, from the tell-tale alternating NUL bytes.
- Windows-1252 versus ISO-8859-1, from bytes in the 0x80–0x9F range that only Windows-1252 assigns to printable characters.
How the mojibake fix works
Garbled text such as é is usually UTF-8 bytes (C3 A9) that were decoded as Windows-1252. The fixer reverses that mistake: it maps each character back to the byte it came from and decodes the bytes as UTF-8 again. Double-encoded text (fixed once, still wrong) can be run through the fixer twice.
Converting between encodings
Choose UTF-8 (with or without BOM), UTF-16 LE or BE, Windows-1252 or ISO-8859-1 and download the converted file. Characters that do not exist in the target encoding are replaced with ? and counted so you know what was lost. For the background, read our guide to ASCII, Unicode and UTF-8.