Unicode Character Inspector & UTF-8 Byte Analyzer
Paste any string, symbol, identifier, or payload snippet to inspect its exact ISO/IEC 10646 Unicode code points, UTF-8 wire bytes, UTF-16 surrogate pairs, and normalization form. Built for diagnosing hidden zero-width characters, database insertion failures, and cross-script homograph spoofing.
How to Use This Character & Byte Inspector
Visual text editors intentionally hide formatting control codes, byte-order marks, and script boundaries from human readers. When debugging broken API payloads, database truncation errors, or file-system naming collisions, follow this workflow:
- Paste the Raw String: Copy the exact string from your log file, JSON payload, or database record into the inspector box (whitespace and control codes are preserved).
- Audit Security & Schema Warnings: Check the diagnostic banner above the table for mixed-script homographs, zero-width control characters, or 4-byte supplementary plane symbols.
- Compare Code Points vs. UTF-8 Wire Bytes: Inspect the hexadecimal byte sequence generated by each character to verify how much storage space the string consumes on the wire or in a fixed-width database column.
- Sanitize or Export: Use the Strip Invisible Characters button to remove non-printing control codes (`U+200B`, `U+FEFF`, `U+200C`) or export the breakdown as structured JSON.
UTF-8 Variable-Width Encoding Architecture (RFC 3629)
A common point of confusion in enterprise software engineering is the distinction between a Unicode Code Point and its Character Encoding. Unicode (maintained by the Unicode Consortium alongside ISO/IEC 10646) assigns every character across human writing systems a unique mathematical integer from U+0000 to U+10FFFF. UTF-8 (RFC 3629) is the variable-width byte serialization protocol that translates those integers into 1 to 4 bytes for network transmission and disk storage.
| Code Point Range | UTF-8 Byte Width | Binary Byte Structure (Bit Mask) | Typical Character Set & Examples |
|---|---|---|---|
U+0000 – U+007F |
1 Byte | 0xxxxxxx |
Standard 7-bit US-ASCII characters, Latin letters (A-Z), digits (0-9), and basic punctuation. 100% backward-compatible with legacy ASCII parsers. |
U+0080 – U+07FF |
2 Bytes | 110xxxxx 10xxxxxx |
Latin-script diacritics (é, ñ), Greek, Cyrillic, Hebrew, and Arabic scripts. |
U+0800 – U+FFFF |
3 Bytes | 1110xxxx 10xxxxxx 10xxxxxx |
Remainder of the Basic Multilingual Plane (BMP), including currency symbols (€ at U+20AC), CJK ideographs (中), and zero-width formatting codes. |
U+10000 – U+10FFFF |
4 Bytes | 11110xxx 10xxxxxx 10xxxxxx 10xxxxxx |
Supplementary Astral Planes, including modern emojis (🚀), rare historic scripts, and specialized mathematical notation. |
Four Critical Encoding Failures in Enterprise Systems
Character encoding discrepancies frequently remain dormant during local testing and surface only when production systems exchange data across heterogeneous operating systems, databases, or financial gateways:
- 1. Legacy Database 3-Byte Truncation (MySQL
utf8mb3vs.utf8mb4): Early relational database implementations optimized storage by capping UTF-8 columns at 3 bytes per character (covering only the Basic Multilingual Plane up toU+FFFF). When a user submits a 4-byte character (such as an emoji or extended CJK character), legacy tables throw anIncorrect string valueexception or silently truncate the record. Maintaining clean audit trails inside information systems requires full 4-byteutf8mb4support across tables, connection drivers, and API compatibility layers. - 2. Unicode Normalization Collisions (NFC vs. NFD): Unicode permits visually identical characters to be represented in multiple ways. For example,
écan be stored as a single precomposed code point (NFC:U+00E9, 2 bytes) or as a base letterefollowed by a combining acute accent (NFD:U+0065+U+0301, 3 bytes). Because macOS HFS+/APFS file systems historically favored NFD while Linux and Windows use NFC, unnormalized file names can break scalable file naming conventions and cause duplicate keys in enterprise metadata repositories. - 3. Zero-Width Characters & Byte-Order Marks (BOM): Copy-pasting identifiers from rich-text documents, PDFs, or messaging apps frequently injects invisible formatting characters such as the Zero-Width Space (`U+200B`) or the Zero-Width No-Break Space / UTF-8 BOM (`U+FEFF`). A leading
EF BB BFbyte sequence at the start of a configuration file or CSV stream can corrupt automated parsers and violate file format standards or long-term PDF/A archival standards. - 4. IDN Homograph & Spoofing Attacks: Attackers exploit characters from different scripts—such as substituting the Latin small letter
a(U+0061) with the visually identical Cyrillic small letterа(U+0430)—to register deceptive domain names or bypass string validation filters. Always combine character inspection with our URL Component Analyzer and enforce strict ASCII patterns with the File Naming Convention Builder.
Frequently Asked Questions (Unicode & Character Encoding)
JavaScript, Java, and C# store strings internally using UTF-16 code units (16 bits / 2 bytes per unit) rather than UTF-8. Characters in the Basic Multilingual Plane (U+0000 to U+FFFF) fit into a single 16-bit unit. However, characters above U+FFFF (such as 🚀 at U+1F680) require a UTF-16 surrogate pair consisting of two 16-bit code units (0xD83D and 0xDE80), causing .length to report 2 for a single visible character.
A Code Point is a single atomic number in the Unicode table (e.g., U+0041). A Code Unit is the minimum bit block used by an encoding format (8 bits in UTF-8, 16 bits in UTF-16). A Grapheme Cluster is what a human reader perceives as a single visible character on screen, which may be constructed from multiple code points linked together by combining marks or Zero-Width Joiners (U+200D).
In UTF-8, the Byte-Order Mark is represented by the code point U+FEFF, which encodes to the three hexadecimal bytes EF BB BF at the very beginning of a file or stream. Unlike UTF-16, UTF-8 has no byte-endianness ambiguity, so RFC 3629 discourages the use of BOM in UTF-8 streams. You can detect U+FEFF in the inspector table above and strip it with the Strip Invisible Characters button.
The W3C and IETF recommend NFC (Normalization Form Canonical Composition) for web content, JSON API payloads, and database storage. Applying string.normalize('NFC') at the API ingestion boundary ensures that decomposed sequences (such as e + combining accent U+0301) are canonically composed into a single deterministic code point before hashing, indexing, or string comparison.