TextLimit

How TextLimit counts text

Characters and visible graphemes

The main character total uses JavaScript's Array.from, which counts Unicode code points rather than UTF-16 code units. The visible grapheme total uses Intl.Segmenter with grapheme granularity when the browser provides it. A joined emoji or a letter plus combining mark can therefore count as one grapheme while containing multiple code points.

Words

Word count uses Intl.Segmenter with English word granularity and includes segments the browser marks as word-like. When that API is unavailable, TextLimit falls back to splitting trimmed text on whitespace. Hyphens, apostrophes, symbols, and scripts without spaces can be treated differently by another editor, so authoritative destination rules take precedence.

UTF-8 bytes

Byte count uses the browser's TextEncoder and reports the length of the UTF-8 encoded draft. Basic ASCII usually needs one byte per character, while accented letters, non-Latin scripts, emoji, and combined sequences can need more. The counter measures only the pasted string, not JSON escaping, database framing, or protocol headers added elsewhere.

Lines, paragraphs, and sentences

Line count recognizes Unix, classic Mac, and Windows line endings. Paragraphs are groups separated by a blank line. Sentence count uses a practical punctuation-based rule for periods, exclamation points, and question marks; it is not a grammatical parser and can treat abbreviations or unusual punctuation differently from an editor.

SMS encoding and segments

TextLimit checks every symbol against the GSM-7 basic and extension tables. Basic symbols use one septet and extension-table symbols use two. A GSM-7 message fits 160 units in one segment or 153 per linked segment. If any character requires Unicode, the calculation uses Unicode code points with limits of 70 for one segment and 67 per linked segment.

Reading and speaking time

Reading time divides the word count by 225 words per minute. Speaking time uses 140 words per minute. Both are deterministic planning baselines. Technical material, pauses, names, tables, slide changes, audience interaction, and performance style can change real duration, so fixed-time scripts still need rehearsal.

SEO pixel estimate

The pixel figure is a lightweight width heuristic, not a browser screenshot of a search result. It assigns wider estimates to letters such as M and W, narrower estimates to punctuation and letters such as i and l, and intermediate values to capitals, spaces, and other characters. Search engines can use different fonts, devices, queries, and rewritten snippets.

Limit status

For editable character, word, or byte limits, the selected metric is compared directly with the numeric target. SMS mode compares the encoding units used. A draft at or below the target passes; a draft above it reports the exact amount over. Whitespace and line breaks remain part of any metric that counts them.

Smart shorten

Counting is local. Smart shorten is an explicit optional action that sends the draft, target, unit, and selected tone to TextLimit's Cloudflare Worker and configured Workers AI model. The result must be reviewed for meaning and accuracy; automated shortening can omit qualifiers or alter emphasis even when it meets the requested length.