ForHosting KIT · Text & AI

Sentence counter

“Hello world. This is a second sentence! Is this a third?” counts as 3 sentences, averaging 18 characters each. A run like !!! is a single ending, and a last line without a period still counts. Free in your browser.

  • Free
  • Runs in your browser
  • No sign-up
  • Your data stays on your device
Use it from WebAPIEmailTelegramApp soon
If you enter
Text
Hello world. This is a second sentence! Is this a third?
You get
Sentence count
3
Sentences
3
Average sentence length
18
Operation
sentence_count

A sentence counter answers a simple editorial question: how many sentences are in this block of text? Writers, students, editors, and product teams use that number to check readability targets, tighten marketing copy, grade short-answer drills, and validate content length rules before publish. This capability scans your plain text for terminal punctuation—periods, exclamation marks, and question marks—and returns a single deterministic sentence total you can trust in scripts and in the free browser form. Runs of the same terminal marks count as one ending, optional closing quotes are tolerated, and a final clause without a period still counts so informal notes are not under-counted. Empty or whitespace-only input is rejected with a clear validation error instead of a silent zero.

How the sentence counter detects sentence ends

The detector walks your plain text and treats a sentence boundary as a run of terminal punctuation characters drawn from the set period, exclamation mark, and question mark. A run such as three exclamation points or a question mark followed by an ellipsis-style period sequence is still one ending, so dramatic punctuation does not inflate the total. Closing quotation marks or brackets that sit immediately after the terminal run are allowed and do not start a new sentence.

After an ending, the next non-whitespace character begins the following sentence. If the final clause of the text has no terminal mark at all, that trailing fragment still contributes one sentence, which matches how people draft messages and bullet-like notes without finishing every line with a period. Abbreviations such as Doctor or Mister that use a period may split earlier than a human editor would prefer; treat the result as a fast terminal-punctuation total rather than a full linguistic parse.

For classroom grading and pipeline checks, that honesty is a feature: every client sees the same rule set.

Where sentence counts show up in real work

Writing coaches and secondary-school language arts classes set sentence-count targets for paragraphs and short responses; a shared counter keeps peer review and auto-graders aligned. Content marketers measure how dense a landing-page hero or product blurb is before A/B tests, because three long sentences read differently from eight short ones even at the same word count. Localization teams compare source and target sentence totals to catch dropped clauses after machine translation.

Support and legal teams skim policy snippets and ticket templates to keep answers scannable. Product engineers gate form fields, review prompts, and chatbot training examples with a minimum or maximum sentence total before accept. If you later need a full word-and-character breakdown, a readability score, or summarization into one sentence, treat those as separate search intents and landings rather than overloading this focused sentence counter page.

Essay and homework sentence targets

Check that a student paragraph meets a required sentence minimum before submit, with the same total the teacher’s script will compute.

Marketing copy density checks

Count sentences in hero text, ads, and email openers so short-form and long-form variants stay within brand readability rules.

Translation and CMS QA gates

Compare source and translated sentence totals in pipelines to flag dropped or merged clauses before publish.

How does the sentence counter decide where a sentence ends?

It detects terminal punctuation: periods, exclamation marks, and question marks. A run of those marks counts as one ending. Optional closing quotes or brackets after the run are allowed. A trailing clause without a final mark still counts as one sentence.

What happens if I send empty text?

Empty strings and whitespace-only strings are not allowed; provide a non-empty string to count.

Does it count words or characters too?

No. This landing is focused on sentence totals. For words, characters, paragraphs, and lines in one response, use the separate word-and-character counter.

Are abbreviations handled perfectly?

No. Periods inside abbreviations can look like sentence ends. The tool is a deterministic terminal-punctuation counter, not a full linguistic parser, so results stay stable across clients.

What does it cost?

The browser tool is free and runs locally.

Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.

POSThttps://api.kit.forhosting.com/str/sentence-count

Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.

curl -X POST https://api.kit.forhosting.com/str/sentence-count \
  -H "Authorization: Bearer $KIT_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello world. This is a second sentence! Is this a third?"}'
{
  "text": "Hello world. This is a second sentence! Is this a third?"
}
{
  "task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
  "type": "str.sentence_count",
  "status": "queued",
  "_links": {
    "result": "/tasks/tsk_…/result"
  }
}

The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.

Per request$0.002

Published price — no tokens, no invented credits. A failed task is never charged.

HTTPCodeMeaning
401unauthorizedMissing or invalid API key.
402insufficient_balanceYour balance doesn't cover the task price.
404unknown_typeThat task type doesn't exist.
429rate_limitedToo many requests. Use the webhook instead of polling.

How the sentence counter detects sentence ends

Whitespace-only and empty strings are rejected with invalid_input so callers cannot mistake a blank paste for a zero-sentence document. The algorithm is a pure deterministic string scan: no random seeds, no wall-clock timestamps, no network calls, and no language model, so the same input always produces the same JSON.

What you send and what you get back

Send one required string field named text, or one of the documented aliases such as content, body, message, or input. The example payload in the contract is a short three-sentence sample so the free form and the API probe share a working case. On success the response echoes the original text, returns sentence_count as the primary total, repeats the same integer under sentences for clients that prefer a plural name, and includes average_sentence_length as the mean character length of the trimmed segments so you can spot unusually long clauses at a glance. The operation field is always the constant sentence_count for logging and multi-tool dashboards. Missing text, empty strings, whitespace-only strings, non-finite numeric stand-ins, and objects that are not strings fail with invalid_input and are not charged. Very large payloads above the character cap are rejected with a clear length message so workers stay bounded. Pricing for successful API calls is the published base of $0.002 per item; validation failures do not consume prepaid balance.

Where sentence counts show up in real work

Because this capability is a pure parse engine, API pricing is the published base of $0.002 per successful item and failed validation does not consume balance.

Read the full KIT documentation →