How to count the byte size of text in UTF-8 and UTF-16
A database column takes "255 characters" — but is that 255 letters or 255 bytes? For anything beyond plain English the two differ, and guessing wrong means truncated data or a rejected payload. This guide explains the gap between characters and bytes.
The fastest way
Paste or type into the Character & Byte Counter and it shows characters, Unicode code points, lines, and the exact UTF-8 and UTF-16 byte size, all updating as you type.
Characters vs bytes
- Character — one symbol you see on screen.
- Code point — one Unicode value; some glyphs (emoji with modifiers) use several.
- Byte — one unit of storage; how many a character takes depends on the encoding.
In UTF-8: ASCII letters are 1 byte, accented Latin ~2, most CJK 3, and emoji 4+. That's why "café" is 4 characters but 5 bytes.
UTF-8 vs UTF-16
UTF-8 is the default for the web and files. UTF-16 is used inside Windows, Java and JavaScript strings, and some databases, where every character is at least two bytes. If a limit is defined in one encoding, counting in the other gives the wrong answer — the Byte Counter shows both so you never have to guess.
Related text tools
For essays and social limits you usually want the word and character totals instead — the Word Counter covers those. And if you're sizing text for embedding in a data URL or JSON, the Base64 Encoder shows how much the encoding inflates it (Base64 adds about a third).
A note on privacy
The Byte Counter runs locally in your browser — your text is never uploaded.