b2KIT

Text Encoding Detector

Detect the character encoding of text or files and convert between UTF-8, ASCII, ISO-8859, and other encodings.

Tested tool guide Tested browser tools Checked August 16, 2026

What Text Encoding Detector does and how it behaves

An encoding label describes bytes, not just the letters visible on screen. Text Encoding Detector evaluates pasted characters or a selected file, reports a plausible character encoding, and converts content to a chosen encoding such as UTF-8, ASCII, or an ISO-8859 variant. File processing remains in the browser. The common surprise is that pasted text has already been decoded by the browser, so its original bytes and encoding label are gone. File analysis can be informative, but pasted text cannot prove its source encoding.

How the result is produced

1

Evidence in file bytes

Character encodings map byte sequences to characters. A file may contain a byte-order mark, byte combinations that are invalid under one candidate, or non-ASCII bytes that narrow the possibilities. If every byte falls in the shared ASCII range, several encodings produce exactly the same text. Detection can then identify compatibility, but it cannot establish which label the file's producer intended.

2

Target encoding limits

Conversion has two logical stages: interpret the source as characters, then represent those characters in the requested target encoding. UTF-8 can encode every Unicode scalar value. ASCII cannot encode accented letters, non-Latin scripts, or emoji, while legacy single-byte encodings each cover a limited repertoire. A conversion is usable only if required characters survive or any replacements are knowingly acceptable.

Good uses

  • Inspecting a legacy CSV before import when accented names, currency symbols, or punctuation appear as question marks or unrelated characters.
  • Converting a configuration or source-data file to UTF-8 before adding it to a repository whose text files use that encoding.
  • Checking whether text intended for an ASCII-only field contains characters that cannot be represented by the ASCII character set.

Limits and checks

  • ASCII-only bytes do not distinguish ASCII from UTF-8 or several legacy encodings. A reported compatible label is not proof of the file's history.
  • A short sample may contain too little evidence for reliable detection, especially when it lacks accented letters, symbols, or bytes outside the ASCII range.
  • Readable decoded text is not conclusive. Several single-byte encodings accept every possible byte, and choosing the wrong one may corrupt only a few characters.

Common questions

Why can an ASCII file be detected as UTF-8?

Every byte from 0 through 127 has the same character meaning in ASCII and UTF-8, so a file containing only those bytes provides no distinguishing evidence. It may also be compatible with several older single-byte encodings. The useful conclusion is that UTF-8 can represent the content unchanged, not that detection recovered the label originally chosen by the author.

Can the tool restore text that is already garbled?

Not always. If the wrong encoding was applied once and the resulting characters still preserve the original byte values, choosing the correct source encoding may recover the text. If characters were replaced, discarded, normalized, or passed through multiple mistaken conversions, information may already be lost. Detection cannot reconstruct bytes that are no longer present, so compare repaired text with a trusted source.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools