FINAL TOOLBOX
05 // Unicode, Symbol & Encoding WorkbenchUTF8-HEX-INSPECTOR

Grapheme, Code Point & UTF-8 Byte Length Counter

Accurately measures UTF-8 payload byte size (for S3 keys, VARCHAR byte limits, SMS segments, and HTTP headers) alongside UTF-16 code units and Unicode code points.

UTF-8 BYTES
27
CODE POINTS
20
UTF-16 UNITS
20
BYTES / CHAR
1.35
UTF-8 and UTF-16 byte breakdown
#CharCode PointDecimalUTF-8 HexUTF-16
1HU+004872480048
2eU+0065101650065
3lU+006C1086C006C
4lU+006C1086C006C
5oU+006F1116F006F
6␣U+002032200020
7世U+4E1619990E4 B8 964E16
8界U+754C30028E7 95 8C754C
9␣U+002032200020
10—U+20148212E2 80 942014
11␣U+002032200020
12ΔU+0394916CE 940394
13xU+0078120780078
14␣U+002032200020
15=U+003D613D003D
16␣U+002032200020
170U+003048300030
18.U+002E462E002E
190U+003048300030
205U+003553350035
Was this tool helpful?

Reference Table

  • 01PostgreSQL `VARCHAR(n)` counts Unicode characters, whereas Oracle `VARCHAR2(n BYTE)` and network packet headers enforce raw UTF-8 byte counts.
  • 02Standard GSM-7 SMS messages fit 160 characters, but a single non-GSM Unicode glyph switches encoding to UCS-2 (70 UTF-16 code units per segment).

Frequently Asked Questions

How do I count exact UTF-8 bytes in modern JavaScript?+

Run `new TextEncoder().encode(str).length` — available natively in all modern browsers, Node.js, Deno, and Edge runtimes.

How do I count visible user-perceived characters (graphemes)?+

Use `Array.from(new Intl.Segmenter('en', { granularity: 'grapheme' }).segment(str)).length` so ZWJ emoji sequences count as 1 character.

How many UTF-8 bytes do CJK (Chinese/Japanese/Korean) characters take?+

Almost all common CJK Unified Ideographs (`U+4E00–U+9FFF`) occupy 3 bytes per character in UTF-8 and 2 bytes in UTF-16.