Forms / The visual dictionary

Character counter.

Shows how much text is entered relative to a limit.

Also calledcharacter countremaining characters
01

See it in context

UI illustration

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.

WebiOSiPadOSAndroidmacOSWindowsLinux

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.

Primary documentation for the pattern and its platform conventions.