ops@toolbox:~$ textcounter --run

Text & Byte Counter

Live character, word, line and UTF-8 byte counts for any text.

Characters
Without spaces
Words
Lines
UTF-8 bytes
Longest line

Why bytes and characters diverge

The two counts on this page that surprise people are characters vs. bytes. ASCII text has one byte per character, but UTF-8 spends two bytes on most accented letters, three on CJK characters, and four on emoji, so "50 characters" can be anywhere from 50 to 200 bytes. Systems limit one or the other, rarely telling you which: DNS TXT records cap strings at 255 bytes, many database VARCHAR(n) columns count characters while older MySQL utf8 silently corrupted 4-byte ones, SMS segments at 160 GSM characters or 70 UCS-2 ones, and command-line argument limits (ARG_MAX) are byte counts. When something truncates mysteriously, comparing these two numbers is the first diagnostic.

Character counting is itself subtle

This counter counts Unicode code points, not JavaScript's UTF-16 units, so an emoji counts as one character, not two. (Grapheme clusters go further: a family emoji is several code points joined invisibly. If a system disagrees with this count by a small margin on emoji-heavy text, that's why.)

The longest-line row

It's there for the config-file cases: some ancient daemons and protocols cap line lengths (SMTP says 998 bytes; some syslog pipelines truncate at 1024 or 8192), certificate PEM lines wrap at 64, and a 4,000-character line in a YAML file is usually a paste accident about to become a parse error. Spotting an outlier line length before deploying beats spotting it in the error log after.

Related tools

Diff Checker
Compare two texts line-by-line and see additions and removals highlighted.
User-Agent Parser
Decode user-agent strings: browser, engine, OS and bot detection.
Regex Tester
Test JavaScript regular expressions with live match highlighting and capture groups.
Case Converter & Slugify
Convert text between camelCase, snake_case, kebab-case, Title Case and URL slugs.