Text Encoding Detector
Guess the encoding of pasted bytes or a file by testing the common encodings and scoring each result.
Detect the encoding
Best guess: —
Confidence: —
How to use the Text Encoding Detector
- Paste hex bytes, paste some text or choose a file.
- Let the tool test each candidate encoding against the bytes.
- Read the best guess, the confidence and the decoded preview.
Features
- Tests UTF-8, UTF-16 with and without a BOM, Latin-1 and Windows-1252
- Byte order marks detected and reported
- Confidence score for every candidate
- Replacement characters counted in each preview
Advertisement
Frequently Asked Questions
Common questions about the free online text encoding detector.
It decodes the bytes with each candidate encoding and scores the result on printable
characters and decoding errors.
A byte order mark is a short signature at the start of a file that names the encoding and the
byte order, making the answer certain.
UTF-8 is strict about byte patterns, so when the bytes decode cleanly with no errors it is
almost certainly UTF-8.
Text stored as UTF-16 usually has a zero byte next to every ASCII character, and the side the
zeros fall on shows the byte order.
A replacement character is shown when a byte cannot be decoded, so a count above zero means
the guess is probably wrong.
Both map single bytes to characters, but Windows-1252 gives printable characters such as
curly quotes where Latin-1 has control codes.
Yes. Choose a file and up to the first 4096 bytes are read on your device and scored.
Short or mostly ASCII samples decode under several encodings, so the scores are too close to
be certain.
No. The file is read with FileReader in your browser and no byte of it ever leaves your
device.
Yes. Encoding detection is a guess based on byte patterns, so check the preview before
trusting the answer.
Last updated: October 10, 2026