Byte & Character Counter

Words, Lines, UTF-8

Count UTF-8 bytes, characters, words, lines, and sentences instantly. Free online byte counter and string size tool.

This conversion runs only in your browser — nothing is uploaded.

Counts run locally in your browser — nothing is uploaded.

Characters

0

Words

0

Lines

0

Bytes (UTF-8)

0

  • Characters (no spaces)0
  • Sentences0

Input

What is this tool?

This string counter measures text length from several practical angles: characters, characters without whitespace, words, lines, sentences, and UTF-8 bytes. Counts update live as you type; nothing is uploaded.

Different limits count different things. A UI field may cap characters, a database column may cap bytes, an editorial brief may cap words, and an API may care about encoded payload size. Non-ASCII characters can use multiple UTF-8 bytes even when they look like one glyph.

Common use cases

  • Check meta descriptions, social posts, or form fields against character vs byte limits
  • Compare translation length before shipping UI copy
  • Measure API or log payload size in UTF-8 bytes before sending

How to use

  1. Paste or type text into the input. KPIs (characters, words, lines, UTF-8 bytes) update live at the top.
  2. Use characters without spaces and sentences in the chip row for finer checks.
  3. Load Sample to see ASCII vs Hangul/emoji byte differences.
  4. Copy the stats summary or Clear when done.

Examples

Input / settingOutputNotes
Hello world.chars 12 · no-spaces 11 · words 2 · lines 1 · sentences 1 · UTF-8 12Simple ASCII.
안녕하세요chars 5 · words 1 · UTF-8 15Hangul: 3 bytes per syllable in UTF-8.
Hi 👋chars 5 · words 2 · UTF-8 7Space + waving hand: JS length 5 (👋 = 2 UTF-16 units), UTF-8 7.
One.\nTwo!lines 2 · sentences 2 · words 2Newline starts a new line; ! ends a sentence.

Practical pitfalls

  • UTF-8 bytes ≠ characters: Hangul, CJK, and emoji inflate byte size; do not use string.length alone for storage quotas.
  • Words are whitespace-based: CJK or glued tokens without spaces usually count as one word—not a linguistic tokenizer.
  • Character count is JavaScript UTF-16 length: some emoji are two “characters” even though they render as one glyph.
  • Sentence detection is punctuation-heuristic; U.S.A.-style abbreviations can over-count.

References

Last reviewed: 2026-07-27

Frequently asked questions

Why do UTF-8 bytes differ from character count?
Character count uses JavaScript string length (UTF-16 code units). UTF-8 byte size is what TextEncoder produces. Non-ASCII text (Hangul, emoji, accents) often needs more than one byte per visible character—and some emoji use two UTF-16 units but four UTF-8 bytes.
How are words counted?
After trimming, the text is split on whitespace (spaces, tabs, newlines). Consecutive spaces still count as one break. Text without spaces—such as many CJK phrases—counts as one word.
Are sentences counted accurately for every language?
Sentences are heuristic: runs ending with `.`, `!`, or `?`. Abbreviations (e.g. `Dr.`) and scripts that do not use those marks can skew the count.
Is text uploaded?
No. All counts run locally in your browser.