Character counter.
Shows how much text is entered relative to a limit.
See it in context
What it is
A counter can report used or remaining characters near a short writing field. It becomes more useful as the person approaches a meaningful boundary, such as a message length limit.
When to use it
Show the limit clearly and preserve the draft when the limit is exceeded.
Know the difference
A word count measures words; a character counter measures individual text characters.
Across platforms
Web
Use a labeled native input and its appropriate type, inputmode, and autocomplete hints. Browser presentation and the available autofill UI vary.
iOS · iPadOS · Android
Choose the keyboard and content type for the value being entered. Keep the field visible above the on-screen keyboard and preserve the user’s selection.
macOS · Windows · Linux
Support ordinary keyboard editing, selection, paste, and undo. A desktop field should not depend on a touch-only accessory keyboard.
Go to the source
Primary documentation for the pattern and its platform conventions.