A Text Limit May Count More Than the Symbols You See

Illustrated stack of abstract image cards with smooth and pixelated patterns
AI-generated conceptual illustration, not a product photograph or software screenshot.

A message box can reject text even when your visible character count seems to fit. One possible explanation is that the interface and your count are using different units for the same string.

The MDN maxlength reference states that the HTML limit is measured in UTF-16 code units. Those units often match simple characters, but they do not always match the symbols a reader perceives as single characters.

For a practice comparison, use an ordinary letter and then an emoji in a test form you control. Some visible symbols require multiple code units. A counter designed around a different definition can therefore disagree with the browser’s limit.

This does not mean users should have to learn an encoding system to write a short message. A well-designed form explains its limit, keeps its counter consistent with validation and gives a helpful error before text is lost.

When reporting the problem, describe the exact sample that fails using non-sensitive text. Include whether you typed or pasted it and whether the displayed counter changed as expected. Avoid sharing a private message merely to demonstrate a counting issue.

For developers, agree on the counting rule across the interface and server. The important outcome is predictable behaviour for the user. A label saying “ten characters” is only helpful when the application consistently communicates what it will accept.

The accompanying visual is an editorial illustration.