Skip to content
Aback Tools Logo

Text Encoding Detector

Paste text or upload a file to instantly detect its character encoding. The Text Encoding Detector checks for Byte Order Marks (BOM), validates UTF-8 byte sequences, and uses statistical analysis to identify the encoding with confidence scores. Detects UTF-8, UTF-16, UTF-32, ISO-8859-1 through ISO-8859-15, Windows-1252, Shift-JIS, EUC-JP, GB2312, GBK, Big5, EUC-KR, KOI8-R, KOI8-U, MacRoman, IBM437, and more - all processing runs locally in your browser, no uploads, no signup, completely free.

Text Encoding Detector

Paste text or upload a file to detect its character encoding. The tool checks for Byte Order Marks (BOM), validates UTF-8 sequences, and uses statistical analysis to identify the encoding with a confidence score. Detects UTF-8, UTF-16, ISO-8859, Windows-1252, Shift-JIS, GB2312, Big5, KOI8-R, and more - all processing runs locally in your browser.

Ctrl+Enter to detect encoding · 0 characters

Why Use Our Text Encoding Detector?

Detects 15+ Character Encodings

The Text Encoding Detector identifies UTF-8, UTF-16 (BE/LE), UTF-32 (BE/LE), ISO-8859-1 through ISO-8859-15, Windows-1252, Windows-1251, Shift-JIS, EUC-JP, GB2312, GBK, Big5, EUC-KR, KOI8-R, KOI8-U, MacRoman, IBM437, and more. Each detection includes a confidence score to help you choose the right encoding.

BOM & Statistical Analysis

The tool first checks for Byte Order Marks (BOM) - the definitive way to identify UTF encodings. If no BOM is found, it uses statistical analysis: UTF-8 byte sequence validation, high-byte pattern matching, character frequency analysis, and null-byte distribution to identify the encoding with high accuracy.

Comprehensive Encoding Reference

Each detected encoding includes a human-readable label, category (Unicode, Western, Cyrillic, Japanese, Chinese, etc.), and a brief description. The tool also shows all encoding aliases (e.g., "latin1", "cp1252", "sjis") so you can use the right name in your code or database configuration.

100% Private Browser Processing

Your text and files never leave your device. All encoding detection - from BOM scanning to statistical analysis - happens locally using the browser TextEncoder and typed arrays. No server uploads, no data logging, no signup required. Completely free and private.

Common Use Cases for Text Encoding Detector

Database Export Recovery

When databases export CSV or SQL dumps with incorrect encoding declarations, use the Text Encoding Detector to identify the actual encoding of the exported data. This is essential when importing legacy data or recovering content from misconfigured exports with garbled text.

Web Scraping & API Integration

When scraping websites or consuming APIs that don't declare their charset, detect the encoding of the response body before processing. The Text Encoding Detector helps you identify UTF-8, Shift-JIS, GB2312, and other encodings commonly used in international web content.

Legacy Document Conversion

Convert legacy documents saved in Windows-1252, MacRoman, IBM437, or other legacy encodings to modern UTF-8. First detect the original encoding, then use the information to correctly transcode the file without losing accented characters, symbols, or special formatting.

Debugging Mojibake (Garbled Text)

When text displays as garbled characters (mojibake - like "é" instead of "é"), use the Text Encoding Detector on the raw bytes to determine the actual encoding. Compare the detected encoding against the declared encoding to diagnose and fix the mismatch.

Multilingual Content Analysis

When processing multilingual content that mixes scripts - Cyrillic, Japanese, Chinese, Arabic, Hebrew, Korean - the Text Encoding Detector identifies the encoding used for each text segment. Essential for localization projects, translation workflows, and international CMS migration.

File Upload Encoding Validation

When building applications that accept file uploads, validate that the uploaded file uses the expected encoding before processing. The Text Encoding Detector can be used to verify that CSV files, configuration files, or data exports use UTF-8 or another required encoding.

Understanding Text Encoding Detection

What is Text Encoding Detection?

Text encoding detection is the process of identifying which character encoding was used to encode a sequence of bytes into readable text. When text is saved to a file, its characters are converted to bytes according to an encoding scheme - UTF-8, Windows-1252, Shift-JIS, and others. The Text Encoding Detector analyzes byte patterns, looks for Byte Order Marks (BOM), validates UTF-8 sequences, and uses statistical analysis to determine which encoding is most likely, helping you correctly interpret garbled or unknown text.

How Our Text Encoding Detector Works

  1. Input text or file - Paste text directly into the text area or upload a file. The tool reads the raw bytes using the browser FileReader API. If you paste text, it encodes it as UTF-8 bytes for analysis. All processing is local - nothing is uploaded to any server.
  2. Byte Order Mark (BOM) scan - The tool checks the first bytes of the data for known BOM signatures. If a BOM is found (EF BB BF for UTF-8, FF FE for UTF-16LE, FE FF for UTF-16BE, etc.), the encoding is identified with near-certainty. BOM detection is the most reliable method and takes priority.
  3. Statistical encoding analysis - If no BOM is found, the tool performs multi-layer statistical analysis: UTF-8 byte sequence validation (checking proper multi-byte sequences and rejecting overlong/ surrogate encodings), null-byte distribution analysis for UTF-16/UTF-32 detection, high-byte pattern matching for single-byte encodings (ISO-8859-1, Windows-1252, KOI8-R), and ASCII range checking for 7-bit ASCII text.

Supported Encoding Detection Methods

  • BOM (Byte Order Mark) Detection: Identifies 11 BOM signatures including UTF-8 (EF BB BF), UTF-16BE/LE, UTF-32BE/LE, UTF-7, UTF-1, SCSU, BOCU-1, and GB-18030. BOM detection gives >99% confidence and is the gold standard for Unicode encodings.
  • UTF-8 Validation: Full RFC 3629-compliant validation checking proper start bytes (0xC2-0xDF, 0xE0-0xEF, 0xF0-0xF4), valid continuation bytes (0x80-0xBF), rejection of overlong sequences, surrogate halves (0xED 0xA0+), and codepoints above U+10FFFF (0xF4 0x90+).
  • UTF-16 Statistical Detection: Analyzes null-byte positions to distinguish big-endian from little-endian in UTF-16 encoded text. Scans for ASCII-range characters (where one byte is 0x00 and the other is 0x20-0x7E) to determine byte order.
  • Single-Byte Encoding Detection: Uses character frequency analysis and valid-byte-range checking for ISO-8859 families, Windows code pages (1250, 1251, 1252), KOI8-R/U, MacRoman, and IBM437/850/866. Windows-1252 is distinguished from ISO-8859-1 by detecting bytes 0x80-0x9F which are valid in Windows-1252 but not in ISO-8859-1.

Privacy, Security & Availability

The Text Encoding Detector processes everything locally in your browser. No text or file data is ever uploaded to any server - all BOM scanning, UTF-8 validation, and statistical analysis happens on your device using the browser TextEncoder and typed arrays. There are no signup requirements, no usage limits, no premium features, and no data logging. The tool is completely free for any purpose - debugging mojibake, analyzing legacy files, or learning about character encodings.

Related Tools

Steganography Detector

Upload an image to detect potential hidden data using LSB (Least Significant Bit) steganography analysis. Analyzes pixel-level modifications, shows a heatmap of altered pixels, detects statistical anomalies, and extracts hidden text messages if found. Compatible with standard LSB encoding and the STEG magic header format. All processing happens locally in your browser - free online steganography detector, no signup required.

Image File Size Analyzer

Upload any image to see a detailed binary-level breakdown of what contributes to its file size - pixel data, compression overhead, metadata (EXIF/IPTC/XMP), color profiles (ICC), and structural headers. Get prioritized optimization tips with estimated savings for web performance, mobile app optimization, and storage reduction. Supports JPEG, PNG, GIF, WebP, BMP, TIFF, AVIF, and HEIC - all processing runs locally in your browser, no server upload required. Free online image file size analyzer.

File Magic Byte Detector

Upload any file to instantly detect its true file type by reading the magic bytes (file signature / header). The tool bypasses incorrect file extensions and reveals the real format. Shows hex dump with matching signature bytes highlighted, ASCII interpretation, MIME type, file category, and extension match analysis. Supports over 120 file signatures across 16 categories: images, audio, video, documents, archives, executables, fonts, certificates, disk images, and more. All processing runs locally in your browser - free online File Magic Byte Detector, no signup required.

Image Clone Detector

Detect copy-move forgeries in images using pixel-block matching. Upload any image to find cloned/copied regions, view heatmap overlays showing the location and intensity of detected clones, and get confidence scores with region details. Three sensitivity presets for different detection needs. 100% private browser-based processing - free online Image Clone Detector.

Frequently Asked Questions About Text Encoding Detector

A Text Encoding Detector analyzes raw bytes and determines which character encoding was used to create the text. It detects UTF-8, UTF-16, ISO-8859, Windows-1252, Shift-JIS, GB2312, KOI8-R, and more by looking for Byte Order Marks (BOM), validating UTF-8 byte sequences, and statistically analyzing high-byte patterns. This is essential for fixing garbled text (mojibake) and correctly interpreting legacy files.

The tool can detect over 30 encodings: UTF-8, UTF-16BE/LE, UTF-32BE/LE, ASCII (7-bit), ISO-8859-1 through ISO-8859-15, Windows-1252, Windows-1251, Windows-1250, Shift-JIS, EUC-JP, ISO-2022-JP, GB2312, GBK, GB 18030, Big5, Big5-HKSCS, EUC-KR, KOI8-R, KOI8-U, MacRoman, IBM437, IBM850, and IBM866. Each detection includes a confidence score (0-100) and the detection method (BOM, statistical, or fallback).

A Byte Order Mark (BOM) is a special byte sequence at the start of a text file that declares its encoding and byte order. For example, EF BB BF indicates UTF-8, FE FF indicates UTF-16BE, and FF FE indicates UTF-16LE. BOMs are the most reliable way to identify encodings since they are explicitly placed by the encoding software. The tool detects 11 different BOM signatures.

BOM-based detection is 99% accurate since BOMs are explicit encoding markers. Statistical detection accuracy depends on the amount of text and the distinctiveness of the encoding. For text with many high-byte characters (like accented letters or non-Latin scripts), accuracy is very high. For short ASCII-only text snippets, multiple encodings may appear valid - the tool shows all possibilities ranked by confidence.

The tool performs full RFC 3629-compliant UTF-8 validation by checking that every byte sequence follows UTF-8 rules: proper start bytes (0xC2-0xF4), correct number of continuation bytes (0x80-0xBF), no overlong sequences (like using 2 bytes to encode ASCII characters), no surrogate halves, and no codepoints above U+10FFFF. If the entire byte stream passes all checks, UTF-8 is reported with a high confidence score.

ISO-8859-1 and Windows-1252 are identical for bytes 0xA0-0xFF but differ in the range 0x80-0x9F. In ISO-8859-1, these bytes are control characters (C1 controls). In Windows-1252, they contain printable characters like smart quotes (", "), dashes (-, -), the Euro sign (€), and trademark symbols (™, ©). The tool detects Windows-1252-specific bytes to distinguish the two encodings.

Yes - you can either paste text directly into the text area or upload a file. The tool reads the file as raw bytes using the browser FileReader API and performs all analysis locally. Text you paste is first converted to UTF-8 bytes using TextEncoder, then analyzed the same way as uploaded files. No data is ever sent to a server.

The byte statistics show: ASCII printable character count and percentage (bytes 0x20-0x7E), null byte count (0x00 - high counts suggest UTF-16/UTF-32 or binary data), high byte count (>0x7F - indicates non-ASCII content like accented characters or CJK), and a binary detection flag. If the tool identifies the data as binary, it suggests using a hex viewer instead.

Yes - 100% free, forever. No signup, no account, no premium tier, no usage limits, and no ads. Detect encoding for as much text as you need. All processing is done locally in your browser with zero server uploads, ensuring complete privacy.