Inspect before truncating

Compare visible and encoded text length

The interactive workspace counts grapheme clusters, code points, UTF-16 code units, and strict UTF-8 bytes. Add a custom grapheme limit to see the remaining allowance or the amount over.

Loading the character counter…

Enable JavaScript to inspect text. The Unicode length definitions, examples, and limit guidance below remain available.

One string, four valid lengths

Choose graphemes, code points, code units, or bytes deliberately

A person usually expects a “character limit” to follow visible units: an accented letter or joined emoji should not be torn apart. Unicode calls the practical boundary used here an extended grapheme cluster. It is an approximation of a user-perceived character, not a promise that every font, language, or editing task will treat every sequence identically.

A code point is a value in the Unicode codespace, written like U+0065 or U+1F600. ECMAScript strings expose a third layer: sequences of 16-bit code units. A code point above U+FFFF occupies a surrogate pair, which is why "😀".length equals 2. Files and network payloads add a fourth layer when the string is encoded as UTF-8 bytes.

The counter reports all four because limits are contracts. A database column measured in bytes, a JavaScript API measured in UTF-16 units, and a product field measured in visible graphemes can accept different amounts of the same text. The label “500 characters” is incomplete until the unit and normalization policy are named.

Grapheme clusters
Locale-aware extended boundaries that approximate visible characters.
Code points
Unicode coded values obtained by code-point iteration.
UTF-16 code units
The 16-bit elements counted by JavaScript string length.
UTF-8 bytes
The strict encoded payload length when every scalar value is valid.
Custom limit
A grapheme allowance with remaining and over-limit status.

Small examples expose the layers

The same visible length can require different storage

Text and representationGraphemes · points · unitsUTF-8 bytes
é · U+00E91 · 1 · 12 bytes: C3 A9
· U+0065 U+03011 · 2 · 23 bytes: 65 CC 81
😀 · U+1F6001 · 1 · 24 bytes: F0 9F 98 80
👨‍👩‍👧‍👦 · joined family1 · 7 · 1125 UTF-8 bytes

The first two rows commonly render as the same accented letter. The counter intentionally does not normalize them, so their underlying lengths remain distinguishable. The family sequence combines four emoji with three zero-width joiners; treating its code points as independently removable “characters” can leave a visibly broken result.

A Unicode boundary algorithm

Grapheme boundaries depend on current segmentation data

The grapheme total uses Intl.Segmenter with grapheme granularity. The API follows locale negotiation and an implementation's Unicode boundary data. Unicode Standard Annex #29 defines default extended grapheme cluster rules, including behavior for combining marks, emoji modifiers, regional indicators, and zero-width-joiner sequences. ECMA-402 defines the JavaScript segmentation interface.

Boundary behavior is not frozen independently of the browser. A newer engine can ship updated Unicode properties or tailoring, and specialized editors may apply domain-specific rules beyond the default algorithm. Persist the original text and record the runtime when a limit decision must be audited exactly.

A grapheme count is designed for cursor movement and user-facing limits, but it does not measure visual width. One cluster may be narrow, wide, invisible, rendered as a missing-glyph box, or shaped with its neighbors. Layout limits need font and rendering measurement in addition to string segmentation.

Counting editorial length?

Graphemes answer a visible-character question. Words and sentences need locale-aware word and sentence boundary rules plus separate paragraph and line definitions.

Open the Word Counter →

Match the receiving contract

Use the custom grapheme limit for visible-character policies

  1. 1

    Name the unit

    Confirm whether the receiver limits graphemes, code points, UTF-16 code units, or encoded bytes. Do not infer it from the word “character.”

  2. 2

    Set the allowance

    Enter a custom grapheme limit to track how many visible clusters remain or how far the current text exceeds that allowance.

  3. 3

    Truncate safely

    If graphemes are the contract, cut only at a grapheme boundary. Recheck bytes afterward if transport or storage has an additional byte ceiling.

The custom limit does not rewrite, clip, or apply Unicode normalization after the textarea value is received. HTML textarea behavior converts CRLF and CR line endings to LF before analysis. A service that applies other normalization, strips controls, or counts a different Unicode version may still produce a different result, so test representative emoji and combining sequences against the actual destination.

Exact input, strict encoding

Normalization and lone surrogates change the byte question

No NFC, NFD, NFKC, or NFKD transformation is applied to the current textarea value. HTML textarea behavior has already converted CRLF and CR line endings to LF, so byte-exact source comparisons must account for that conversion. Normalize Unicode only when the consuming protocol requires a named form; signatures, hashes, database keys, and byte contracts must follow their own rules.

Most text typed normally consists of Unicode scalar values, but a JavaScript string can contain a lone high or low surrogate. The ECMAScript String type permits sequences of 16-bit values that are not well-formed UTF-16. A lone surrogate has a UTF-16 code-unit count but no direct UTF-8 encoding as a Unicode scalar value.

The Web's WHATWG TextEncoder accepts a USVString, which converts lone surrogates to U+FFFD before UTF-8 encoding. That replacement is useful interoperability behavior, but its three bytes are not a byte-preserving encoding of the original code unit. This counter therefore treats UTF-8 byte length as unavailable and reports the malformed input instead of silently using the replacement total.

Trace text all the way to bytes

ASCII, Unicode, UTF-8, UTF-16, graphemes, and hex notation describe related but separate layers.

Read ASCII vs Unicode vs UTF-8 →

Local inspection

Measure text without a counting API request

Counting runs in this browser tab. LiveParse does not intentionally upload the entered string to a character-count endpoint or save a server-side history. That reduces exposure for draft copy, identifiers, and sample payloads.

Local processing is not the same as an isolated device. Browser extensions, clipboard utilities, accessibility software, screenshots, crash reporting, and the operating system remain outside this page's control. Remove secrets that do not need to be measured and follow the data-handling policy that applies to the device.

Need words and reading time?

Switch to locale-aware word and sentence segmentation, structural paragraph and line counts, and adjustable pace estimates.

Count words and sentences →

Questions answered

Character counter FAQ

What does character count mean in this tool?

The primary character total is a grapheme-cluster count, which approximates user-perceived characters. The tool also reports Unicode code points, JavaScript UTF-16 code units, and UTF-8 bytes so a platform's exact unit can be matched.

Why can one emoji count as several code points?

An emoji shown as one grapheme can be a sequence containing people, skin-tone modifiers, variation selectors, regional indicators, or zero-width joiners. Grapheme segmentation keeps many such sequences together while code-point counting exposes their components.

What is the difference between a code point and a UTF-16 code unit?

A code point is a Unicode coded value. A UTF-16 code unit is one 16-bit value in an ECMAScript string; code points above U+FFFF use a surrogate pair and therefore occupy two UTF-16 code units.

How does the tool handle an unpaired surrogate?

An unpaired UTF-16 surrogate is not a Unicode scalar value. Rather than silently count replacement-character bytes, the tool marks the strict UTF-8 byte result unavailable and shows an error until the malformed string is repaired.

Does the character counter normalize Unicode text?

No Unicode normalization is applied to the current textarea value. A precomposed accented letter and a base letter followed by a combining mark remain distinct. HTML textarea behavior separately converts CRLF and CR line endings to LF before analysis, which can change code-unit and byte totals.

Is the custom limit based on bytes?

No. The custom limit tracks grapheme clusters and reports how many are remaining or how far the text is over. If a service defines its limit in code points, UTF-16 units, or UTF-8 bytes, compare the corresponding metric instead.