How to Count Words and Characters for Content Checks
Word count is useful for estimating length. Character count is what actually matters when content needs to fit a platform limit, a database column, or a form field constraint. Knowing which metric to use — and what counts as a "character" — prevents cut-off content and rejected submissions.
When character count matters more than word count
Most technical constraints are expressed in characters, not words:
- SEO meta descriptions: Google typically shows 150–160 characters. Content beyond that gets an ellipsis — but often what Google actually truncates at is 160 characters of display width, which varies with proportional fonts. Keeping meta descriptions under 155 characters is safe for all devices.
- Page titles for SEO: 60 characters maximum before truncation in most search results. Titles are weighted heavily for keywords — every character counts.
- Twitter/X: 280 characters. URLs always count as 23 characters regardless of actual length. Emoji count as 2 characters each.
- SMS: Standard SMS is 160 characters per segment. Messages longer than 160 characters are split and billed as multiple segments. Unicode characters (including most emoji) reduce the limit to 70 characters per segment.
- Database columns:
VARCHAR(255)silently truncates or throws an error if content exceeds 255 characters. User-facing form fields often correspond directly to database column widths.
Platform-specific character limits
| Platform/context | Limit | Notes |
|---|---|---|
| Google meta description | 155–160 chars | Varies by device |
| Google page title | 60 chars | Weighted for SEO |
| Twitter/X post | 280 chars | URLs = 23 chars |
| LinkedIn post | 3,000 chars | 125 visible before "more" |
| Instagram caption | 2,200 chars | 125 visible before "more" |
| YouTube title | 100 chars | 60 recommended |
| Standard SMS segment | 160 chars | 70 with Unicode/emoji |
Character counting gotchas
Emoji are multiple characters in most counting systems. An emoji like 🎉 takes 2 UTF-16 code units, which is how JavaScript counts string length — and how Twitter counts characters. "Hello 🎉".length in JavaScript returns 8, not 7. A word counter that uses JavaScript string length matches Twitter's behaviour but may differ from other platforms.
HTML tags aren't content characters. If you're counting characters for an SEO meta description, count the plain text — not the HTML markup around it. <p>Hello</p> is 5 content characters, not 16.
Whitespace is real. Trailing spaces, double spaces between words, and invisible Unicode characters all count. A character counter that shows "with spaces" vs "without spaces" lets you see both.
Markdown syntax is counted. A Markdown link like [click here](https://example.com) is 38 characters in source but would be 10 characters when rendered. Count the rendered output for platform limits.