Sentence Counter

Count sentences in plain text with the browser's locale-sensitive segmenter when available, with a more limited punctuation fallback for older browsers.

Last updated: August 2026 | By Workshelve Team

Paste a draft, article, message, or caption to estimate sentence boundaries and inspect matching word counts plus grapheme counts when browser segmentation is available.
Sentence Count
0

Sentences

0

Words

0

Graphemes

0

Browser-locale segmentation

Modern browsers can segment sentences, words, and graphemes with Intl.Segmenter, but that uses the browser locale rather than auto-detecting the language of your pasted text.

Counts are models

This tool estimates sentence boundaries. It is useful for drafts and editing targets, but it is not a grammar engine and does not decide whether a fragment is a complete sentence in the linguistic sense.

Fallback is weaker

Older browsers fall back to punctuation-based sentence splitting, which can over-count abbreviations like Dr. and still miss difficult language-specific or quotation edge cases.

What This Counter Measures

The primary count is a sentence-boundary estimate. When available, the tool usesIntl.Segmenter with sentence granularity. That follows the browser's locale-sensitive segmentation rules, which is better than splitting only on periods, question marks, and exclamation points.

Even then, the result is still segmentation rather than grammatical analysis. The tool identifies likely sentence boundaries, but it does not judge whether a fragment is a complete sentence in the formal linguistic sense.

The companion stats use the same principle. Word count uses word segmentation when available. Grapheme count uses grapheme segmentation when supported; older browsers fall back to Unicode code-point counting and label that fallback explicitly.

How the Counting Works

Preferred model

Sentence count uses Intl.Segmenter(undefined, { granularity: 'sentence' }) when supported. Word count uses granularity: 'word' with isWordLike, and grapheme count uses granularity: 'grapheme'.

Fallback model

Older browsers fall back to punctuation-based sentence splitting. That fallback recognizes `.`, `!`, `?`, `ใ€‚`, `๏ผ`, `๏ผŸ`, and `ุŸ` even when no space follows the punctuation, but it is still only a rough estimate and can split abbreviations or miss more complex sentence boundaries. Word counting also falls back to whitespace-delimited tokens, which is not reliable for languages that do not normally separate words with spaces.

Why browsers can disagree

Different browsers and environments can ship different segmentation data. Two valid implementations may occasionally disagree on difficult edge cases, especially with mixed-language text, abbreviations, quotations, and fragments without terminal punctuation.

Worked Examples

Example 1: Abbreviation edge case

Input: Dr. Smith arrived. Hello world!
Naive fallback split count: 3
Expected sentence interpretation: 2

This shows why punctuation-only logic is weaker. It can incorrectly treat the abbreviation Dr. as a full sentence boundary.

Example 2: Grapheme vs UTF-16 length

"๐Ÿ™‚": UTF-16 length = 2, grapheme count = 1
"๐Ÿ‘จโ€๐Ÿ‘ฉโ€๐Ÿ‘งโ€๐Ÿ‘ฆ": UTF-16 length = 11, grapheme count = 1

The old label Characters was misleading because JavaScript string length counts UTF-16 code units, not user-perceived characters. When Intl.Segmenter is available, the tool reports grapheme clusters; older browsers fall back to Unicode code points and label them accordingly.

Frequently Asked Questions

Does this tool detect the language of my text automatically?

No. When Intl.Segmenter is available, it uses the browser runtime locale configuration rather than detecting the language of the pasted text itself.

Why can sentence counts be imperfect?

Sentence boundaries are messy. Abbreviations, quotes, headings, ellipses, fragments, and mixed-language punctuation can all make segmentation ambiguous.

Why did you rename Characters to Graphemes?

Because JavaScript string length counts UTF-16 code units, which can over-count emoji and composed character sequences. With Intl.Segmenter, the tool reports grapheme clusters; older browsers instead report Unicode code points and label them that way.

Is the fallback as good as Intl.Segmenter?

No. The fallback is only a punctuation-based estimate for older browsers. It is useful as a backup, but it can over-split abbreviations and miss harder language-specific cases.

Why might two browsers disagree?

They may ship different locale data or segmentation behavior. That can produce small differences on difficult sentence-boundary cases.

Does this tool decide whether writing is grammatically correct?

No. It estimates sentence boundaries and word boundaries, plus grapheme clusters when Intl.Segmenter is available. Older browsers use weaker fallbacks, and the tool does not grade grammar or meaning.

Related Tools