How it works
This online byte counter shows the size of a text in UTF-8 bytes as you type, with characters, code points and UTF-16 units beside it. The sample reads 33 bytes.
Read the full guide
How many bytes is a character?
In UTF-8 a single character takes 1 to 4 bytes. A plain English letter, a digit or a space is 1. An accented letter such as é is 2, like the basic Greek, Cyrillic, Hebrew and Arabic letters. Common Chinese characters, Japanese kana and Korean syllables are 3. Most emoji are 4, more when built from several pieces.
Bytes to characters and characters to bytes
No fixed rate turns one into the other. Plain English text has as many bytes as characters; anything else widens the gap, as in the sample’s 23 characters and 33 bytes.
Code points and UTF-16 units
A code point is one numbered Unicode character, so an emoji with a skin tone is two. A web form’s length limit counts UTF-16 units: most emoji take two.
- An é typed as one character is 2 bytes; typed as e plus a separate accent it is 3.
Questions and answers
How many bytes is a string?
It depends on the encoding. In UTF-8 the byte length of a string is the first number here. In UTF-16 the same string takes 2 bytes for each unit, so double the UTF-16 units.
How do I count bytes against a byte limit?
Enter the size the field allows as the limit. The page then works as a byte calculator for it: how many bytes are left, or how many over, counted in UTF-8.
Is it a bit counter as well?
A byte is 8 bits, so multiply the byte count by 8 for a bit count. The sample’s 33 bytes are 264 bits.