Unicode Character Counter

Count grapheme clusters, Unicode code points, UTF-16 code units, UTF-8 bytes, words, lines and invisible characters in any text.

Processed locally in your browser

Counts update as you type. The exact input is measured; nothing is normalized, trimmed or modified.

Grapheme clusters 0

User-perceived characters such as letters, emoji sequences and combined accents.

Unicode code points 0

Unicode values in the original text.

UTF-16 code units 0

JavaScript-style string length. Not the same as characters.

UTF-8 bytes 0

Storage size after UTF-8 encoding.

Words 0

Locale-sensitive word segmentation; a practical count, not perfect linguistics.

Lines 0

CRLF, CR, LF and Unicode line separators each count as one line boundary.

Additional metrics

Grapheme breakdown

Position is one-based and counts grapheme clusters, not code points. Invisible or whitespace-only graphemes are shown as a bracketed code-point label.

Per-grapheme code point, unit and byte counts
PositionGraphemeCode pointsUTF-16 unitsUTF-8 bytesNotes
Counts after Unicode normalization (optional comparison)

Comparison only. Your input above is never changed. NFKC and NFKD can merge compatibility distinctions such as ligatures or fullwidth forms, which may not be desirable for exact text.

Grapheme, code point, UTF-16 and UTF-8 counts by normalization form
FormGrapheme clustersCode pointsUTF-16 unitsUTF-8 bytesChanged

Count Unicode characters online

This Unicode character counter measures your exact input: grapheme clusters, Unicode code points, UTF-16 code units, UTF-8 bytes, words, lines and paragraphs. It reports invisible and formatting characters by category, analyzes emoji and combining sequences, and never normalizes, trims or otherwise modifies your text. Everything runs locally in the browser.

Unicode character counting example

Rendered input:

Hello, café 😀

Grapheme clusters: 13. Unicode code points: 13. UTF-16 code units: 14. UTF-8 bytes: 17. UTF-16 bytes: 28. Words: 2. Lines: 1. Paragraphs: 1.

The final emoji alone contributes 1 grapheme cluster, 1 code point, 2 UTF-16 code units and 4 UTF-8 bytes, since it lies outside the Basic Multilingual Plane and is stored as a UTF-16 surrogate pair.

Grapheme clusters vs code points

A grapheme cluster is usually what a person sees as one character. A code point is one Unicode value. A single grapheme cluster can contain several code points: a combining accent added to a base letter, an emoji ZWJ sequence, or a two-part regional-indicator flag are common examples. JavaScript string length measures UTF-16 code units, not grapheme clusters or code points. See What Is a Grapheme Cluster? and Code Points vs Code Units.

UTF-16 code units and JavaScript length

JavaScript strings are indexed in UTF-16 code units. Code points on the Basic Multilingual Plane normally use one code unit. Supplementary-plane code points, including most emoji, use a surrogate pair of two code units. text.length returns this UTF-16 code-unit count, so it should not be described as a character count.

UTF-8 byte count

ASCII code points use one UTF-8 byte. Many Latin-accented characters use two bytes. Many CJK characters use three bytes. Many emoji code points use four bytes. A full grapheme sequence can include several code points, so its total byte count is the sum of every code point it contains. Storage and API limits are frequently measured in bytes rather than visible characters.

Word, line and paragraph counts

Word segmentation is locale-sensitive. This tool uses the browser's built-in Unicode segmentation support where available and counts only word-like segments, falling back to a simpler rule when unavailable. CRLF counts as one line boundary, and so do a lone CR, LF, U+0085 NEXT LINE, U+2028 LINE SEPARATOR and U+2029 PARAGRAPH SEPARATOR. Paragraphs are non-empty blocks separated by one or more blank lines, and U+2029 always marks an explicit paragraph boundary. These are practical counts, not a claim of perfect linguistic analysis.

Emoji and combined characters

Many emoji use a UTF-16 surrogate pair. Flag emoji use a pair of regional-indicator code points. Skin-tone variants use an emoji modifier code point. Family and profession emoji often use a zero-width joiner to combine several people into one sequence. Variation selectors affect text or emoji presentation. A complex emoji sequence can be one grapheme cluster while containing many code points and bytes. These emoji metrics are based on defined Unicode ranges for regional indicators, emoji modifiers, zero-width joiners and variation selectors, not a full Unicode emoji property table, so they are offered as a helpful indicator rather than an exhaustive classification.

Invisible character counts

Invisible is a visual description, not one Unicode category. Zero-width characters, bidirectional controls, special spaces and control characters are all different, and each remains part of the input and counts toward code points and bytes even though it has little or no visible width. Combining marks have no standalone width but are meaningful and are not unwanted by default. Use the Invisible Character Detector for a detailed, per-character inspection.

How to use the counter

  1. Paste or type text into the input field.
  2. Review the live grapheme, code-point, code-unit and byte counts.
  3. Inspect words, lines, paragraphs and whitespace metrics.
  4. Expand the grapheme breakdown for complex emoji or combined text.
  5. Review invisible-character categories when counts differ unexpectedly.
  6. Copy or download the report if needed.

Common use cases

Privacy and local processing

Counting runs with JavaScript directly in your browser. Your text is not submitted to UnicodeNow servers.

Frequently asked questions

What counts as a Unicode character?

There is no single answer. This tool reports several different counts: grapheme clusters (user-perceived characters), Unicode code points, UTF-16 code units and UTF-8 bytes, since each measures something different.

What is a grapheme cluster?

A grapheme cluster is what a person usually perceives as one character, such as a letter, an accented letter, or an emoji sequence, even when it is made of several Unicode code points.

What is the difference between code points and code units?

A code point is one Unicode value. A UTF-16 code unit is one 16-bit storage unit; most Basic Multilingual Plane code points use one code unit, but supplementary-plane code points such as many emoji use a surrogate pair of two code units.

Why does JavaScript length count some emoji as two?

JavaScript string length (text.length) counts UTF-16 code units, not code points or grapheme clusters. An emoji outside the Basic Multilingual Plane is one code point but a surrogate pair of two code units, so it adds two to text.length.

How many UTF-8 bytes does an emoji use?

It depends on the code point. Many emoji code points use four UTF-8 bytes, but a full emoji sequence can include additional code points such as variation selectors or zero-width joiners, each contributing its own bytes.

Why can one visible character contain multiple code points?

Combining marks, emoji ZWJ sequences and regional-indicator flag pairs are common examples. A single grapheme cluster such as a flag or a family emoji can be built from several Unicode code points joined together.

How are words counted?

Word counting uses the browser's built-in Unicode word segmentation where available, counting only word-like segments. Word segmentation is language-sensitive and is a practical count rather than perfect linguistic analysis.

How are lines and paragraphs counted?

CRLF, lone CR, LF, U+0085, U+2028 and U+2029 each count as one line boundary, with CRLF treated as a single boundary. Paragraphs are non-empty blocks separated by one or more blank lines, and U+2029 always marks a paragraph boundary.

Are invisible characters included?

Yes. Zero-width characters, bidirectional controls, variation selectors, soft hyphens, control characters and similar formatting characters remain part of the exact input and are counted toward code points and bytes, and reported separately by category.

Does normalization change the count?

The primary counts always reflect your exact, unmodified input. An optional, collapsed comparison section shows what the counts would be after NFC, NFD, NFKC or NFKD normalization, without changing your input.

Is my text sent to a server?

No. Counting runs with JavaScript directly in your browser; your text is not submitted to UnicodeNow servers.

Related tools

Inspect hidden code points with the Invisible Character Detector, or compare exact and normalized strings with Unicode Text Compare.

Unicode Text Compare

Compare strings exactly and after Unicode normalization.

Text ComparisonProcessed locally

Unicode Character Lookup

Search Unicode characters by glyph, code point, name, script or block.

UnicodeServer tool

Unicode Normalizer

Normalize Unicode text to NFC, NFD, NFKC or NFKD.

NormalizationProcessed locally

Byte Length Calculator

Count UTF-8 bytes, code points, grapheme clusters and UTF-16 code units for text.

EncodingProcessed locally

Unicode Character Inspector

Inspect each Unicode character, encoding, category, script and normalization form.

UnicodeProcessed locally

Related guides

Code Points vs Code Units

Understand Unicode code points, UTF-8 bytes, UTF-16 code units, surrogate pairs, grapheme clusters and why string length can mislead.

What Is a Grapheme Cluster?

Learn how grapheme clusters represent user-perceived characters, why emoji and combining marks affect length, and how to handle text safely.