5 Encodings Compared Live
Measure UTF-8, UTF-16, GBK, Big5, and Shift_JIS byte sizes simultaneously as you type or paste.
Measure exact byte lengths in UTF-8, UTF-16, GBK, Big5, and Shift_JIS alongside Unicode grapheme clusters, code points, words, lines, and database/SEO limits.
In UTF-8, ASCII characters take 1 byte, European accented characters take 2 bytes, Chinese/Japanese/Korean characters take 3 bytes, and Emoji take 4 bytes (or more for ZWJ sequences). Legacy encodings like GBK, Big5, and Shift_JIS use 2 bytes for most CJK characters. Checking exact byte size prevents database truncation and API limit errors.
Measure UTF-8, UTF-16, GBK, Big5, and Shift_JIS byte sizes simultaneously as you type or paste.
Uses Intl.Segmenter so composite Emoji (👨👩👧👦) and accented sequences count as 1 user-perceived character.
Separates 1-byte ASCII, 2-byte Latin/Cyrillic, 3-byte CJK, and 4-byte Emoji characters at a glance.
Flags overflows against MySQL VARCHAR(255), 255-byte payloads, 60-char titles, 160-char meta descriptions, and 2,048-byte URLs.
The same visible character consumes very different storage depending on character encoding:
| Example Character | UTF-8 | UTF-16 | GBK / Big5 | Shift_JIS |
|---|---|---|---|---|
A (Basic ASCII) | 1 B | 2 B | 1 B | 1 B |
é / ü (Accented Latin) | 2 B | 2 B | 2 B | N/A |
中 / あ (Chinese / Japanese) | 3 B | 2 B | 2 B | 2 B |
🚀 (Single Emoji) | 4 B | 4 B | N/A | N/A |
👨👩👧👦 (Family ZWJ Emoji) | 25 B | 22 B | N/A | N/A |
Avoid MySQL InnoDB 767/3072-byte index key errors and Oracle VARCHAR2(n BYTE) truncation on multilingual columns.
Ensure browser cookies stay under 4,096 bytes and encoded query URLs remain well below proxy and CDN limits.
Validate fixed-width mainframe, banking, and Japanese/Chinese ERP import records before batch submission.
Measure visual character lengths cleanly alongside UTF-8 byte footprint for title tags and meta descriptions.
Fallback bytes and line breaks: characters outside legacy character sets (such as Emoji in GBK or Shift_JIS) are counted as a 1-byte "?" fallback. Browser textareas store newlines as LF (1 byte), while Windows CRLF files use 2 bytes per line break.
Emoji sit above U+FFFF so each base code point requires 4 UTF-8 bytes, and composite Emoji (like 👨👩👧👦) combine multiple code points plus ZWJ joiners (25 bytes total) while rendering as 1 grapheme cluster.
Common Chinese and Japanese characters occupy 2 bytes in GBK/Big5/Shift_JIS, whereas UTF-8 encodes most CJK Unified Ideographs in 3 bytes.
JavaScript .length counts UTF-16 code units (so 🚀 has .length === 2). Intl.Segmenter grapheme counting reports the true number of user-perceived characters.
In modern MySQL utf8mb4, VARCHAR(255) limits 255 Unicode code points, which can consume up to 255 × 4 = 1,020 bytes of storage.
Yes. Each Unix newline (\n) adds 1 byte in UTF-8 and 2 bytes in UTF-16; Windows CRLF (\r\n) adds 2 bytes in UTF-8.
Standard ASCII and basic European characters fit inside 7-bit GSM-7 encoding, allowing 160 characters per SMS segment (153 per part when concatenated). Adding even one CJK character, curly quote, or emoji forces carriers to switch the entire message to 16-bit UCS-2/UTF-16 encoding, dropping the single-SMS cap to 70 UTF-16 code units (67 per concatenated part).