File Encoding Detector
Detect text-file encoding (UTF-8, UTF-16, Shift-JIS, TIS-620) via BOM and heuristics, with clean UTF-8 conversion. Free, private, in-browser.
Loading tool...
What is File Encoding Detector?
File Encoding Detector reads your text fileβs raw bytes, checks for BOM markers, validates UTF-8 multi-byte sequences, and identifies the encoding (UTF-8, UTF-16, Shift-JIS, TIS-620, etc.) - then decodes the content and lets you download a clean UTF-8 copy.
Key Benefits
- Fix mojibake by finding the correct encoding
- BOM detection immediately identifies UTF-8 and UTF-16 files
- Multi-byte sequence validation distinguishes similar encodings
- Clean UTF-8 output works in any modern application
- Files processed locally - sensitive data stays on your device
Common Use Cases
- β’Fixing garbled text in legacy Japanese or Thai documents
- β’Converting old Windows-1252 or Latin-1 files to modern UTF-8
- β’Verifying encoding before importing data into databases
- β’Ensuring consistent encoding across team project files
How to Detect File Encoding
- Choose the file: Select a text file - the encoding is detected automatically from BOM and byte patterns.
- Review the detection: Check the detected encoding, BOM status, and file size in the results panel.
- Download clean UTF-8: Copy or download the decoded content as clean UTF-8 text.
Key Features
- BOM detection for UTF-8, UTF-16 LE, and UTF-16 BE
- Heuristic encoding detection for files without BOM
- UTF-8 multi-byte sequence validation
- Clean UTF-8 decoded output with download and copy
- Supports Windows-1252, Latin-1, Shift-JIS, and TIS-620
- 100% local processing via TextDecoder API
Frequently Asked Questions
What is a BOM (Byte Order Mark)?
A BOM is a special byte sequence at the start of a file that identifies the encoding: EF BB BF for UTF-8, FF FE for UTF-16 LE, and FE FF for UTF-16 BE.
Why is my text garbled (mojibake)?
The file was decoded with the wrong encoding. This tool detects the correct encoding so the content renders properly.
Does it handle Thai (TIS-620) and Japanese (Shift-JIS)?
Yes, heuristic detection can identify these encodings, and the TextDecoder API decodes them for display and conversion.
Is my file uploaded to a server?
No. All processing runs locally in your browser using the TextDecoder API - the file never leaves your device.