Unicode limits guide

Why Unicode Text Changes Character Counts

A phrase can look like ten characters while an app stores or counts more. The result depends on what that app means by a character.

People usually count what they see: one letter, one emoji, or one accented symbol. Software can count text in several different ways. Styled Unicode makes those differences visible because many mathematical letters sit outside the basic range, and decorative effects can add separate marks to each visible letter.

Four meanings of character

When an app says "character limit," it may count one of several units:

  • Visible symbols: what a person sees as one letter or emoji.
  • Grapheme clusters: sequences intended to behave like one user-perceived character.
  • Unicode code points: assigned values such as U+0041 for A and U+1D400 for 𝐀.
  • UTF-16 code units: storage units used by JavaScript and some systems. A code point outside the basic multilingual plane uses a surrogate pair of two units.

These counts are often equal for basic English text. They diverge with mathematical styled letters, emoji sequences, combining marks, and several writing systems.

Ordinary A and mathematical bold A

The ordinary capital A is U+0041. Mathematical bold capital A is U+1D400. Each is one Unicode code point. In UTF-16, however, the ordinary A uses one code unit while mathematical bold A uses two.

An application counting code points may report both as one character. An application counting UTF-16 units may report the styled A as two. This is one reason a bold-looking username or bio can reach a limit sooner than the plain version.

Combining marks can add more

An underline effect can be produced by placing a combining low line after each letter. What looks like one underlined letter can therefore contain the original letter plus a separate combining code point. Strike and overline effects work in a similar way.

Combining marks can also affect cursor movement and deletion. Some editors treat the sequence as one grapheme cluster, while others expose individual parts. Do not use these effects in a field with a strict limit unless you have tested that exact field.

Emoji show the same counting problem

An emoji that looks like one symbol can contain multiple code points joined into a sequence. Skin tone modifiers, variation selectors, zero-width joiners, flags, and family combinations can all change the stored sequence. The issue is not unique to bold text; it is part of working with modern Unicode.

This also explains why two counters can disagree without either being broken. They may be measuring different text units for different purposes.

Example counts

Example What is visible Possible storage detail
A One ordinary letter One code point, one UTF-16 unit
𝐀 One mathematical bold letter One code point, two UTF-16 units
A with a combining line One decorated letter Letter plus combining code point
A joined emoji sequence Possibly one emoji Multiple code points and units

Why a counter may change after pasting

The destination may normalize, reject, replace, or count the incoming text differently. A browser input can enforce a limit using UTF-16 length, while the server checks code points or bytes. The visible counter and final validation can therefore disagree.

Some systems also reserve characters for links, mentions, hashtags, line breaks, or internal markup. Avoid assuming that every unused position shown by a local counter is available after publishing.

How this generator counts input

The counter on this site counts Unicode code points in the input by iterating over the text. It is designed to avoid treating a surrogate pair as two input characters. This makes the local number more useful for common styled letters, but it does not predict every destination's rule.

The output can also have a different stored length from the input. A plain basic letter can become a mathematical character outside the basic multilingual plane, or a combining effect can add marks. Always check the destination after conversion.

How to work with a strict limit

  1. Write the complete message in plain text first.
  2. Leave a margin below the stated limit.
  3. Convert only one short phrase.
  4. Paste it into the exact destination field.
  5. Check the destination's counter and save a private test.
  6. If it is close to the limit, remove styling before removing meaning.

When every character matters

Use plain text for identifiers, database keys, coupon codes, form values, domains, email addresses, and other exact strings. These values should be easy to validate and reproduce. A visual lookalike can cause a failed match even when it appears correct.

For a short social label, a small count difference may be acceptable. For a technical or transactional value, it is an unnecessary risk.

Primary technical references

The Unicode Consortium defines code points and text segmentation. Unicode Standard Annex #29 explains grapheme cluster boundaries, and the Mathematical Alphanumeric Symbols chart lists the core styled characters used by bold text generators.