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/contextLimitNotes
Google meta description155–160 charsVaries by device
Google page title60 charsWeighted for SEO
Twitter/X post280 charsURLs = 23 chars
LinkedIn post3,000 chars125 visible before "more"
Instagram caption2,200 chars125 visible before "more"
YouTube title100 chars60 recommended
Standard SMS segment160 chars70 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.

Word count for AI prompts: tokens are a better metric than words for AI prompt planning, but word count gives a useful rough estimate — 1 token ≈ 0.75 words in English, so a 300-word prompt is roughly 400 tokens. Use an actual token counter when precision matters.