Article
Words, Characters, and Case: How Text Counting Works
Counting text sounds like the one job a computer cannot get wrong, yet two tools will often report different numbers for the same paragraph, an emoji can cost you 70 SMS characters, and 280 characters on social platforms does not always mean 280 keystrokes. Behind everyday tasks like writing to a limit, renaming code variables, or generating placeholder copy sit a few subtle rules worth knowing. This guide walks through how Unicode, limits, and casing work, using private in-browser text tools as working examples.
What counts as a word
Many simple counters define a word the way typists do: a run of visible characters between spaces or line breaks. That single rule already explains most disagreements. Is "state-of-the-art" one word or four? With whitespace splitting, one; with Unicode word segmentation (the Intl.Segmenter approach our word counter uses), four, because hyphens separate word segments. Whitespace rules also break down for languages written without spaces, such as Chinese, Japanese, or Thai, whereas Unicode segmentation detects word boundaries in those scripts too (though character counts remain the practical standard for tight platform limits). Reading time estimates stack a second convention on top: our word counter divides the word count by 200 words per minute, a common average for silent adult reading, so treat the result as a planning figure, not a promise.
| Feature | ASCII (7-bit) | UTF-8 (Variable 1-4B) | UTF-16 (1-2 Code Units) | SMS GSM-7 vs UCS-2 |
|---|---|---|---|---|
| Bytes per Character | 1 byte (0 - 127) | 1 to 4 bytes per code point | 2 or 4 bytes (Surrogate pairs) | GSM-7: 7 bits · UCS-2: 16 bits |
| Character Limit (SMS Segment) | N/A | Varies by byte length | Varies by surrogate pair | 160 chars (GSM-7) / 70 chars (UCS-2) |
| Emoji Representation | Unsupported | 4 bytes (e.g. F0 9F 98 80) | 2 code units (length === 2 in JS) | Forces whole SMS to 70-char limit |
| Universal Compatibility | Legacy systems | Modern web & API standard | JavaScript string internal memory | Global cellular network standard |
A character is not always one symbol
Character counts are murkier, because Unicode text has layers. What you perceive as one character (a grapheme) may be built from several code points, and each code point occupies one or two of the 16-bit units that JavaScript's length property counts. The grinning face emoji is one grapheme but two of those units, so a naive counter says 2. A family emoji built by joining several person emoji is one grapheme, five code points and eight units. Even plain text has this problem: "café" can be stored with é as one code point or as an e followed by a combining accent, identical on screen, different in count. This is why two counters disagree: they measure different layers. The rules for grouping code points into user-perceived characters are standardized in Unicode's text segmentation annex (UAX #29), and well-behaved counters follow it.
| Feature | Delimiter Rule | Idiomatic Language Application |
|---|---|---|
| camelCase | Lower first word + capitalize next (userId) | JavaScript, TypeScript, Java variables & methods |
| PascalCase | Capitalize every word (UserProfile) | Classes, interfaces, React components, types |
| snake_case | Lowercase + underscore delimiter (user_id) | Python, Ruby, SQL database column names |
| kebab-case | Lowercase + hyphen delimiter (user-id) | URLs, CSS class names, HTML attributes, CLI flags |

The limits you are actually counting for
Character limits are where counting becomes money. An SMS carries 160 characters in the compact GSM-7 alphabet, but a single character outside it (an emoji, or a letter the alphabet lacks) switches the whole message to UCS-2 and the limit drops to 70; long messages split into parts of 153 or 67 characters, each billed separately. X allows 280 characters per post, but weighs them: every URL counts as 23 regardless of its real length, and most emoji and CJK characters count as 2. Search snippets have soft limits instead: Google truncates titles and descriptions by pixel width, so the familiar 60-character title and 155-character description figures are working conventions rather than guarantees. When a limit matters, count with the same rules the platform uses, and leave margin.
Case is a convention, and each style has a home
Changing case sounds trivial until you meet the conventions stacked on top of it. Prose knows Title Case, favoured by US headlines, and sentence case, which most European style guides prefer. Code has its own families: camelCase for variables in JavaScript and Java, PascalCase for class and component names, snake_case in Python and databases, SCREAMING_SNAKE_CASE for constants, and kebab-case for CSS classes, file names and URL slugs, where lowercase avoids the classic trap of links that differ only by letter case. Converting a handful of identifiers by hand is fine; converting a list of eighty is how typos are born. A case converter applies the transformation mechanically, including the fiddly parts like deciding what happens to acronyms and existing separators.

Filler text, and files your phone refuses to open
Two more chores round out the set. Layouts are judged with placeholder text because real sentences pull attention to their meaning; lorem ipsum works precisely because it is almost, but not quite, readable Latin. Our generator produces it by the paragraph, sentence or word, so a mockup can be filled to realistic lengths instead of one pasted block repeated. And when someone sends a .md, .json, .csv or .log file that a phone refuses to open, a browser-based text viewer displays it without installing an editor or forwarding the file to some conversion site. Everything above, counting included, runs entirely in your browser: the text never leaves your device, which matters more than usual when the thing you are measuring is a draft, a contract or a log full of internal paths.
Tools in this article
- Word CounterCount words, characters, sentences, paragraphs, and lines with live reading/speaking time, keyword density, and social character gauges.
- Case ConverterConvert text between camelCase, PascalCase, snake_case, kebab-case, dot.case, path/case, Title Case, Sentence case and slugs.
- Lorem Ipsum GeneratorGenerate Lorem Ipsum paragraphs, sentences, words, or lists with HTML, Markdown, JSON, and thematic vocabularies.
- Text / code viewerOpen text, Markdown, HTML, JSON, CSV, XML or YAML files. View raw text and the previews available for each format.
Frequently asked questions
How many words fit on a page?
The publishing conventions are about 500 words for a single-spaced page and about 250 for a double-spaced one, assuming a standard 12-point font on A4 or letter paper. Real documents drift from those figures with every change of font, margin or heading, which is why assignments and submissions increasingly specify a word count instead of a page count. If you have the text, count it directly and skip the estimate; the page conventions are only useful before the text exists.
What does lorem ipsum actually mean?
It is scrambled Latin, not gibberish. The standard passage is cut and reshuffled from Cicero's De finibus bonorum et malorum, a philosophical text from 45 BC; the fragment "dolorem ipsum" means "pain itself". The scrambling is the point: the text looks like natural language, with plausible word lengths and sentence rhythm, but resists being read, so viewers judge the layout instead of the copy. Its modern spread is usually credited to Letraset transfer sheets in the 1960s and desktop publishing software in the 1980s.
Why does a platform count fewer characters than my counter?
Because platforms count with their own weights. X starts from 280 but bills every URL as 23 characters and most emoji and CJK characters as 2 each. SMS gateways switch the whole message from the 160-character GSM-7 alphabet to the 70-character UCS-2 mode as soon as one character requires it. And any platform may count code units rather than graphemes, so a single family emoji can consume 8 of the limit. When the number on the button disagrees with your counter, the platform's rules win; compose with margin or check against the platform's own counter before sending.