Unicode text analysis

Character counter

Count user-perceived characters as you type, then compare words, lines, code points, UTF-16 units, and UTF-8 bytes.

01 / Input

Text to count

Grapheme mode
0 / 250,000 UTF-16 units

Line breaks and whitespace count as characters. The main total uses extended grapheme clusters when the browser supports them.

Compares the target with the main character total.

Ready. Enter text to see live totals.

02 / Counts

Text measurements

Characters
0
User-perceived graphemes
No whitespace
0
Graphemes after whitespace removal
Words
0
Word-like segments
Lines
0
Includes blank and trailing lines
Code points
0
Unicode code point values
UTF-16 units
0
JavaScript string length
UTF-8 bytes
0
Encoded storage size
No target set Add a target above to track how many characters remain.

03 / Method

Why character totals differ

Grapheme clusters

The main total uses Intl.Segmenter with grapheme granularity. A base letter plus a combining accent, a flag, or a joined family emoji can contain several code points while appearing as one character.

Code points and UTF-16

Code points count Unicode values. UTF-16 units report JavaScript string length, so many emoji occupy two units. Neither measure always matches what a reader sees.

Words and lines

Word totals use the browser's Unicode word segmenter when available. Line totals treat CRLF as one break and include empty or trailing lines once text is present.

Limits and interpretation

  • Input is limited to 250,000 UTF-16 units so live counting remains responsive. The optional target accepts whole numbers from 1 through 1,000,000.
  • If Intl.Segmenter is unavailable, character totals fall back to Unicode code points and the status identifies that mode. Complex emoji and combining sequences can then count higher than expected.
  • Default Unicode boundaries are a practical general rule, not a guarantee of how every language, editor, social platform, or database enforces its limits.
  • UTF-8 bytes are calculated with the browser's TextEncoder. An unavailable encoder is reported instead of silently substituting another unit.