What Is File Encoding Converter?
File Encoding Converter detects and converts the character encoding of text files. Upload a file, auto-detect its encoding, preview the content, select a target encoding, and download the converted file — all directly in your browser. This tool runs 100% client-side. Your files are never uploaded to any server.
It supports 31 encodings including UTF-8, UTF-16, ISO-8859 variants, Windows codepages, CJK encodings (Shift_JIS, EUC-JP, GBK, Big5, EUC-KR), and more. Features include advanced auto-detection with frequency analysis, BOM control, source and output preview, drag-and-drop upload, and a dedicated encoding detection mode.
How to Use This Tool
Upload a Text File
Click Upload File or drag and drop a text file onto the input area. Supported formats: .txt, .csv, .json, .html, .py, .js, .xml, .md, and 30+ more. Max file size: 50MB.
Detect & Verify Encoding
The source encoding is auto-detected. Click Detect Encoding for detailed results with confidence level. Verify with the source preview — if text looks garbled, change the source encoding and click Refresh preview.
Choose Target Encoding
Select the target encoding from the dropdown. For UTF-8/UTF-16, choose BOM handling (Auto, Include, or Strip). Click Preview Output to verify the conversion before downloading.
Convert & Download
Click Convert & Download to convert and save the file. Click Clear All to reset everything and start fresh.
Features Explained
31 Encoding Support
▼
Supports UTF-8, UTF-16 LE/BE, ASCII, ISO-8859-1 through ISO-8859-8 and ISO-8859-15, Windows-1250 through Windows-1257, KOI8-R, IBM866, Shift_JIS, EUC-JP, ISO-2022-JP, EUC-KR, GB2312, GBK, and Big5. Both decoding (reading) and encoding (writing) are fully supported for all 31 encodings.
Advanced Auto-Detection
▼
Encoding is auto-detected using multiple heuristics: BOM (Byte Order Mark) detection for highest confidence, UTF-8 multi-byte validation, null-byte analysis for UTF-16, escape-sequence detection for ISO-2022-JP, byte-range scoring for CJK encodings (Shift_JIS vs EUC-JP vs GBK vs Big5 vs EUC-KR), and frequency analysis for Cyrillic (KOI8-R vs Windows-1251), Greek, Arabic, Hebrew, and Central European encodings.
Dedicated Detect Encoding Mode
▼
Click Detect Encoding for a detailed panel showing the detected encoding, confidence level (High/Medium/Low with reason), BOM presence, and file size. Useful when you just want to identify an unknown file's encoding without converting.
Full Target-Encoding Output
▼
Unlike tools that silently output UTF-8, this tool genuinely encodes to the target format. Single-byte encodings use reverse character-to-byte mapping from the browser's TextDecoder. Multi-byte encodings (Shift_JIS, EUC-JP, GBK, Big5, EUC-KR) use two-byte reverse lookup tables. Unmappable characters are replaced with '?'.
BOM Insertion & Removal
▼
For UTF-8 and UTF-16 targets, choose how to handle the Byte Order Mark: Auto (UTF-16 includes BOM, UTF-8 strips it), Include (force BOM), or Strip (remove BOM). Some systems require BOM, others break with it — this gives you full control.
Source & Output Preview
▼
The source preview shows the first 500 characters decoded with the selected source encoding. The output preview shows the converted text re-decoded with the target encoding, so you can verify the conversion is correct before downloading.
Drag & Drop Upload
▼
Drag a text file from your file explorer directly onto the input area. The area highlights when a file is dragged over it. Files are validated for type and size on drop.
File Type & Size Validation
▼
Only text-based files are accepted (.txt, .csv, .json, .html, .py, .js, .xml, .md, and 30+ more extensions). Binary files like images, videos, and PDFs are rejected. Maximum file size is 50MB to prevent browser memory issues.
Detection Confidence Levels
▼
High confidence when BOM is detected (definitive proof of encoding). Medium confidence for valid UTF-8 multi-byte sequences. Low confidence for heuristic-based detection of single-byte encodings where byte ranges overlap between encodings.
Who Is This Tool For?
Developers
Fix encoding issues in source files, config files, and data imports. Convert between UTF-8 and legacy encodings for cross-platform compatibility.
Translators
Handle files from clients in regional encodings (Shift_JIS, GB2312, Windows-1251) and convert them to UTF-8 for modern tools.
Data Analysts
Clean CSV and TSV files with encoding mismatches that cause garbled characters in spreadsheets and databases.
Web Developers
Ensure HTML, CSS, and JavaScript files use correct encoding for proper rendering across browsers and locales.
System Administrators
Convert log files, config files, and scripts between encodings when migrating between Windows, Linux, and macOS systems.
Subtitle Editors
Convert .srt and .ass subtitle files between encodings to fix character display issues in media players.
Tips for Encoding Conversion
Check the preview first
If the source preview shows garbled text, the detected encoding is wrong. Change it manually and click Refresh preview until the text looks correct.
UTF-8 is usually the safest target
UTF-8 supports all Unicode characters and is the default encoding for the modern web, GitHub, and most programming tools.
Use Preview Output before downloading
Click Preview Output to see how the converted text will look. If characters are replaced with '?', the target encoding doesn't support those characters.
BOM can cause issues
Some tools (like PHP, Bash scripts) break with UTF-8 BOM. Use Strip mode for code files. Use Include mode for CSV files opened in Excel.
CJK files need the right encoding
Japanese files may be Shift_JIS, EUC-JP, or ISO-2022-JP. Chinese files may be GB2312, GBK, or Big5. If auto-detection picks wrong, try each manually.
Small files are harder to detect
Auto-detection works better with more text. For very small files (under 100 bytes), detection confidence may be low. Verify manually.
Privacy & Security
This tool runs 100% in your browser. Your files are never uploaded to any server. All encoding detection, conversion, and preview rendering happens locally using JavaScript and browser-native TextDecoder/TextEncoder APIs.
No cookies are used, no analytics track your files, and no third-party services have access to your documents. Files exist only in your browser's memory while the tool is open. Click Clear All to remove all data immediately.