Loading tool…
Count the UTF-8 byte size of any string, along with its character count and UTF-16 code units.
Loading tool…
Byte Counter is a free, private online tool that lets you count how many bytes a string uses in UTF-8, plus characters and UTF-16 units. It runs entirely in your browser, so nothing you enter is uploaded to a server.
Privacy: this tool runs entirely in your browser. Your input is never sent to, received by, or stored on any server — there are no uploads and no tracking of what you enter.
A character isn't always one byte. In UTF-8, ASCII is 1 byte but accented letters take 2 and emoji take 4, so byte size differs from character count.
Database column limits, SMS segments, API payload sizes and tweet limits are often measured in bytes or code units, not characters.
Character count, UTF-8 byte count and UTF-16 code-unit count for the same text.
This tool counts how many bytes a piece of text occupies when encoded in UTF-8, alongside its character count and UTF-16 code-unit count. The three numbers are often different, and knowing the byte length matters for storage limits, network payloads and any system that measures size in bytes rather than characters.
In UTF-8, a character is not always one byte. Plain ASCII (English letters, digits, basic punctuation) takes one byte each, but accented letters take two, most other scripts take three, and emoji take four bytes. So a 10-character string with an emoji can be far more than 10 bytes. UTF-16 (used internally by JavaScript) counts differently again, with most characters as one unit and emoji as two.
UTF-8 is a variable-length encoding: it uses one to four bytes per character, assigning shorter sequences to the most common characters. This makes it efficient for English-heavy text while still able to represent every character in Unicode. Its backward compatibility with ASCII is a big reason it became the dominant encoding of the web.
Many limits are defined in bytes, not characters: database column sizes (a VARCHAR(255) may mean 255 bytes), SMS segment boundaries, DNS labels, HTTP headers, and various API field limits. If you count characters when the limit is bytes, multibyte content like emoji or non-Latin text can silently overflow. Checking the byte length avoids those surprises.
Type or paste text and the character count, UTF-8 byte count and UTF-16 code-unit count update instantly. It is useful for fitting database fields, estimating payload sizes, understanding why an emoji counts as several bytes, and debugging encoding issues. Everything runs in your browser.