Character Encodings Explained: UTF-8, UTF-16, ASCII, and Windows-1252
How character sets, Byte Order Marks (BOM), and Unicode code points work, and how to avoid mojibake text corruption.
What is Character Encoding?
Computers do not store letters, emojis, or hieroglyphs; they only store binary zeros and ones (0 and 1). A character encoding is a standardized key table that translates integer numbers (known as Code Points) into sequences of bytes.You can create, test, and save files with custom character encodings using our TXT File Maker, and format text strings with the Text Case Converter.
The Evolution of Character Sets
#1. ASCII (1963)
- 7 bits per character (Range: 0x00 to 0x7F). - Total 128 characters. - Sufficient only for American English.#
2. Windows-1252 / ANSI
- 8 bits per character (Range: 0x00 to 0xFF). - Included accented vowels (é, à, ü) and typographical symbols (£, €, ©). - Flaw: Incompatible with Cyrillic, Greek, Arabic, and Asian scripts.#
3. Unicode & UTF-8 (1993 - Present)
- Universal character repertoire exceeding 1,114,112 code point slots. - UTF-8: Variable length from 1 to 4 bytes. - ASCII characters (A-Z) = 1 byte. - Greek, Arabic, Latin Extended = 2 bytes. - CJK (Chinese, Japanese, Korean) = 3 bytes. - Emojis and historical scripts = 4 bytes. - Over 98% of the modern internet is powered by UTF-8.Preventing Text Corruption (Mojibake)
When sharing files across global environments or legacy spreadsheet software (like Microsoft Excel), always save with UTF-8 or UTF-8 with BOM using the TXT File Maker. For batch file provisioning, verify our Batch TXT Generator.Put these concepts into practice
Use our dedicated, browser-based utilities to format, clean, and generate your files instantly.
Ready to Create Plain Text Files?
Open our online notepad and TXT File Maker to write, format, and download .txt files.
More Webmaster & Plain Text Tools
Apply these best practices using our dedicated client-side utilities.
TXT File Maker
Online notepad & text file creator with UTF-8, ANSI & CRLF/LF line endings.
Batch TXT Generator
Generate hundreds of customized text files with variables and ZIP export.
Text Case Converter
Transform strings into UPPERCASE, lowercase, Title Case, camelCase & snake_case.
Related Plain Text Templates
Download standardized templates implementing these guidelines.
More Technical Guides & Tutorials
Deepen your understanding of file systems, data encoding, and DevOps automation.
The Complete Guide to Plain Text (.txt) Files: Architecture, Encodings, and Best Practices
CRLF vs LF: Understanding Line Endings Across Windows, macOS, and Linux
How to Generate TXT Files in Batch for Testing, Automation, and Data Workflows
Frequently Asked Questions
Find quick answers to common questions about plain text files, encodings, and online tools.