Character & Byte Counter

Count characters, code points, and UTF-8 / UTF-16 bytes as you type.

Runs locally in your browser
Statistics No signup · local processing

Start typing or paste text to see character and byte counts

Type or paste text on the left and this tool shows a live count of characters, Unicode code points, lines, and the exact UTF-8 or UTF-16 byte size — all measured in your browser.

Runs entirely in your browser

Count characters and UTF-8 / UTF-16 bytes online, locally

Character & Byte Counter measures your text the way a computer actually stores it. It reports the character count (UTF-16 code units, which is what JavaScript's .length returns), the number of Unicode code points (so an emoji or accented letter counts as one), the line count, and the exact size in bytes for the encoding you pick. The sample text loaded on start contains an emoji (😀) and an accented letter (é) on purpose: the emoji is one code point but takes four UTF-8 bytes, while é is one code point that takes two UTF-8 bytes — which is why the character count and the byte count rarely match. Everything is computed in your browser with the native TextEncoder API; your text is never uploaded anywhere.

Common questions

What is the difference between characters, code points, and bytes?

“Characters” counts UTF-16 code units (what str.length returns), so an emoji outside the basic range counts as two. “Code points” counts each Unicode scalar once, so that same emoji counts as one. “Bytes” is how much storage the text takes once encoded — it depends on whether you choose UTF-8 or UTF-16.

Why does one emoji count as four UTF-8 bytes?

UTF-8 is a variable-length encoding: ASCII characters take one byte, most accented Latin and Greek letters take two, most other scripts take three, and characters beyond U+FFFF — including most emoji — take four bytes. So a single 😀 is one code point but four UTF-8 bytes.

What is the difference between UTF-8 and UTF-16?

UTF-8 uses one to four bytes per code point and is compact for English and ASCII-heavy text, which is why it dominates the web. UTF-16 uses two bytes for common characters and four for the rest; it is what JavaScript strings use internally. For plain English UTF-8 is smaller; for text full of CJK characters UTF-16 can be smaller.

Why doesn't my character count equal my byte count?

They only match when every character is a single ASCII byte. As soon as you include accented letters, symbols, or emoji, each character can take two, three, or four bytes in UTF-8, so the byte total climbs above the character count.

Is my text uploaded anywhere?

No. All counting happens in your browser tab using the native TextEncoder API as you type. Your text never leaves your device and nothing is stored.