Byte Counter

Paste a text or a string to count bytes: its size in UTF-8, with its characters beside it.

A sample. Type or paste your own.

Sample: the counts of the text in grey above.

Bytes
33
Characters
23
Code points
24
UTF-16 units
26

More options a limit for bytes

What the 4 counts mean

The byte count 1

  • Bytes The size of the text in UTF-8. In the sample é takes 2 bytes, 茶 takes 3, and the thumbs-up with its skin tone takes 8.

Counted beside it 3

  • Characters What a reader sees as one character: 23 in the sample. The thumbs-up with its skin tone is 1.
  • Code points Numbered Unicode characters: 24 in the sample, because the skin tone is a code point of its own.
  • UTF-16 units 26 in the sample: the thumbs-up and its skin tone take 2 each, and every other character takes 1.

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.