Available Text Operations
Counting Tools
- Word Count: Count total words in your text
- Character Count: Count characters with and without spaces
Case Conversion
- UPPERCASE: Convert all text to capital letters
- lowercase: Convert all text to small letters
- Title Case: Capitalize Each Word
- Sentence case: Capitalize first letter of each sentence
Text Manipulation
- Reverse Text: Reverse the entire text string
- Remove Duplicates: Remove duplicate lines
- Sort Lines: Sort all lines alphabetically
- Remove Empty Lines: Clean up blank lines
- Trim Lines: Remove whitespace from line edges
- Number Lines: Add line numbers
Generators
- Dummy Text: Generate filler text for designs
Counting Text Is Less Obvious Than It Looks
Every field with a limit — a meta description, a tweet, an SMS, a database column — counts something slightly different, and the differences are large enough to break things.
Characters Are Not Code Points Are Not Bytes
Take a single emoji with a skin-tone modifier. A person sees one character. JavaScript's
.length reports several, because it counts UTF-16 code units. UTF-8 encoding produces
more bytes again.
| Text | Perceived | JS .length | UTF-8 bytes |
|---|---|---|---|
hello | 5 | 5 | 5 |
café | 4 | 4 | 5 |
日本語 | 3 | 3 | 9 |
👋 | 1 | 2 | 4 |
👩💻 | 1 | 5 | 11 |
VARCHAR(255) that counts bytes holds 255 ASCII characters or 63 emoji. A form
validating with .length rejects text a byte-counting backend would accept, and vice
versa. Decide which unit your limit is in before writing the validation.Words Depend on a Definition
"Splitting on whitespace" is a definition, not the definition. Hyphenated compounds, contractions, numbers with separators and em-dashes without spaces all sit on judgement calls, and languages without spaces between words — Chinese, Japanese, Thai — defeat the approach entirely.
For English prose the whitespace rule is close enough that the disagreement between tools is usually 1–2%. For anything where the count is contractual — a word-limited essay, a paid translation — confirm which definition is being applied before you rely on it.
Reading Time Is a Word Count in Disguise
The usual figures come from reading-speed research and are averages with enormous variance:
| Content | Words per minute |
|---|---|
| Technical documentation | 150–200 |
| General non-fiction | 200–250 |
| Light web content | 250–300 |
Length Limits Worth Knowing
| Field | Limit | Counts |
|---|---|---|
| Title tag | ~60 characters displayed | Pixels, not characters |
| Meta description | ~155–160 displayed | Pixels, not characters |
| SMS (GSM-7) | 160 per segment | Characters, 70 if any Unicode |
| Twitter/X | 280 | Weighted code points |
| Open Graph title | ~60–90 | Characters |
i characters fits comfortably; a
title of sixty W characters does not.Which Tool to Use
- [Word counter](/dev/text-tools/word-counter) for drafting to a target length.
- [Character counter](/dev/text-tools/character-counter) for fields with a hard cap,
Everything Happens in Your Browser
The text is counted locally in JavaScript. Nothing is uploaded, nothing is logged, and the tools work offline once the page has loaded — which matters more than it sounds for the obvious use case of pasting in something confidential to check its length.