User-perceived characters such as letters, emoji sequences and combined accents.
Unicode Character Counter
Count grapheme clusters, Unicode code points, UTF-16 code units, UTF-8 bytes, words, lines and invisible characters in any text.
Counts update as you type. The exact input is measured; nothing is normalized, trimmed or modified.
Unicode values in the original text.
JavaScript-style string length. Not the same as characters.
Storage size after UTF-8 encoding.
Locale-sensitive word segmentation; a practical count, not perfect linguistics.
CRLF, CR, LF and Unicode line separators each count as one line boundary.
Additional metrics
This text contains invisible or formatting characters. Use the Invisible Character Detector for a detailed, per-character inspection.
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.
| Position | Grapheme | Code points | UTF-16 units | UTF-8 bytes | Notes |
|---|
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
- Paste or type text into the input field.
- Review the live grapheme, code-point, code-unit and byte counts.
- Inspect words, lines, paragraphs and whitespace metrics.
- Expand the grapheme breakdown for complex emoji or combined text.
- Review invisible-character categories when counts differ unexpectedly.
- Copy or download the report if needed.
Common use cases
- Check user-interface character limits.
- Compare JavaScript length with visible characters.
- Measure UTF-8 payload sizes.
- Count emoji and combined Unicode sequences.
- Debug database and API length validation.
- Inspect invisible characters in imported text.
- Compare composed and decomposed Unicode text.
- Create Unicode test fixtures.
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.
Unicode Character Lookup
Search Unicode characters by glyph, code point, name, script or block.
Invisible Character Detector
Find zero-width, control, variation, private-use and spacing characters.
Unicode Normalizer
Normalize Unicode text to NFC, NFD, NFKC or NFKD.
UTF-8 Encoder and Decoder
Convert text to UTF-8 bytes and validate byte sequences.
Byte Length Calculator
Count UTF-8 bytes, code points, grapheme clusters and UTF-16 code units for text.
Unicode Character Inspector
Inspect each Unicode character, encoding, category, script and normalization form.
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.
How to Count Unicode Characters Correctly
Choose the right Unicode length unit for UI limits, storage limits, APIs, JavaScript, Python and PHP.