Analyse bytes for a byte order mark, ASCII-only content, valid UTF-8 and classic mojibake patterns, separating what can be proven from what can only be guessed.
Show calculation steps
Processed privately in your browser — nothing you paste is uploaded, logged or stored.
How to use the Character Encoding Detector
- Paste the text, or switch the input option to hex and paste raw bytes.
- Click "Analyse encoding".
- Read the findings in order – each is labelled DEFINITIVE, HEURISTIC or GUESS so you know how much weight it carries.
Frequently asked questions
How reliable is automatic encoding detection?
Partly reliable, and this tool is explicit about which part. A byte order mark, pure-ASCII content and UTF-8 validity are decidable facts. Distinguishing between the dozens of single-byte legacy encodings is not – it needs statistical language models, and even those guess wrong.
What is mojibake and why does the tool look for it?
Mojibake is the garbled text produced when UTF-8 bytes are decoded as a single-byte character set and then saved again – the classic sign is an accented letter appearing as two odd characters. It matters because the data is genuinely damaged, not merely mislabelled, so re-declaring the charset will not fix it.
Why can it not simply tell me the exact encoding?
Because for many byte sequences several encodings are equally valid answers. The same bytes can be perfectly good ISO-8859-1 and perfectly good Windows-1252, and only the declared charset or the language of the content can break the tie. Claiming certainty would be dishonest.
What should I do when detection is inconclusive?
Prefer declared metadata: the HTTP Content-Type header, the HTML meta charset tag, an XML declaration or the database column collation. Detection is a fallback for when no declaration exists or the declaration is demonstrably wrong.