This project is not covered by Drupal’s security advisory policy.

Character Counter adds a live, in-place character count under any textarea
field you choose — no theme changes, no per-content-type code. Pick the
fields from a single admin screen, optionally set a character limit per
field, and the count appears immediately below the field on every form where
it's edited: content, comments, custom blocks, and anything else built on
Drupal's Field API.

It works the same way whether the field uses a plain textarea or a
CKEditor-powered text format — the count reflects what the editor actually
shows, not just the underlying raw value.

Features

  • Pick exactly which fields get a counter.
    One settings page lists every eligible textarea field across every entity
    type and bundle; turn each one on or off with a checkbox. A field shared
    across several content types (e.g. a "Body" field used by both Article and
    Page) is a single entry — configure it once.
  • Works with plain textareas and CKEditor alike.
    Counts update live as you type in either case, without any extra
    configuration.
  • Optional per-field character limits.
    Leave a field's limit blank for a plain, unlimited count
    ("128 characters"), or set a maximum to switch it to "used / limit"
    ("128 / 150 characters"), with the counter visually highlighted once the
    limit is exceeded.
  • Never blocks or truncates content.
    A limit here is a visual guide for editors, not a hard validation rule —
    going over it doesn't stop the field from saving, and nothing is ever cut
    short automatically.
  • Accessible by design.
    The counter is linked to its field via
    aria-describedby so screen reader users can find it on demand,
    and crossing a configured limit is announced once — not on every keystroke
    while still over it, which would be far too chatty for anyone using
    assistive technology.
  • Lightweight.
    One small, dependency-free JavaScript behavior and a small stylesheet;
    nothing is loaded on any page unless at least one field is actually
    configured.

Supported field types

  • Text (plain, long) —
    string_long
  • Text (formatted, long) —
    text_long
  • Text (formatted, long, with summary) —
    text_with_summary


    The counter applies to the main body text; the separate summary sub-field
    is left alone, since it's a distinct field with its own, usually much
    shorter, appropriate length.

Use cases

  • Give content editors a live sense of length against an SEO-friendly meta
    description, a card/teaser summary, or any other field with an informal
    "should stay around this long" guideline — without a hard character-limit
    validation rule that would block them from saving.
  • Surface length awareness on comment or custom block bodies where a formal
    field-level constraint isn't appropriate, but editors still benefit from
    seeing the count as they type.
  • Add a lightweight, no-code length indicator to any existing textarea field
    without writing a custom form alter, theme preprocess, or JavaScript.

Requirements

Drupal core only — Field and Text, both
part of any standard installation. No contributed module dependencies.

Installation

Install as you would normally install a contributed Drupal module.
See

Installing Modules

for detailed instructions.

Configuration

Configure at
Administration » Configuration » Content » Character
Counter settings

(/admin/config/content/char-counter).
Access is controlled by the core
Administer site configuration permission; this module
doesn't define a permission of its own.

Maintainers

Chaitanya Rajendra Dessai
(
https://www.drupal.org/u/chaitanyadessai
)

Supporting organizations: 

Project information

Releases