UTF-8 byte counter

20UTF-8 bytes
14Code points
15UTF-16 units

Where the bytes go

Encoding sizeCode pointsTotal bytes
1 byte00
2 bytes00
3 bytes00
4 bytes00

UTF-8 hex preview

First 32 bytes. No byte-order mark is added. Browser text areas normalize line endings to LF.
Why the counts differ

ASCII characters use one UTF-8 byte. Accented letters usually use two, many other writing systems use three, and supplementary characters such as many emoji use four.

JavaScript string length counts UTF-16 code units, not UTF-8 bytes. A supplementary character uses two UTF-16 units but one code point. A combining sequence can look like one character while containing multiple code points. These counts do not measure visual grapheme clusters.

The browser's TextEncoder handles encoding, including replacement of any unpaired UTF-16 surrogate with U+FFFD. Your text is not sent to a server.