Word Counter
Count words, characters, sentences, paragraphs, and estimate reading time.
POST
1 credit
/v1/word-count
curl -X POST "https://devtools.toolkitapi.io/v1/word-count" \
-H "Content-Type: application/json" \
-d '{"text": "Hello world. This is a sample text.\n\nIt has two paragraphs."}'
import httpx
resp = httpx.post(
"https://devtools.toolkitapi.io/v1/word-count",
json={"text": "Hello world. This is a sample text.\n\nIt has two paragraphs."},
)
print(resp.json())
const resp = await fetch("https://devtools.toolkitapi.io/v1/word-count", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({"text": "Hello world. This is a sample text.\n\nIt has two paragraphs."}),
});
const data = await resp.json();
console.log(data);
# See curl example
Response
200 OK
{
"words": 11,
"characters": 60,
"characters_no_spaces": 49,
"sentences": 3,
"paragraphs": 2,
"reading_time": {
"seconds": 3,
"text": "0 min 3 sec"
}
}
Try It Live
Live Demo
Response
Description
Count words, characters, sentences, paragraphs, and estimate reading time.
How to Use
1
1. Send a POST request with the `text` field containing the text to analyze.
2
2. All statistics are returned in a single response.
About This Tool
Word Counter analyzes text and returns detailed statistics: word count, character count (with and without spaces), sentence count, paragraph count, and estimated reading time based on an average of 238 words per minute.
Why Use This Tool
- Content writing — Track word counts for articles, essays, or social media posts
- SEO — Verify content length meets recommended thresholds
- Reading time estimates — Display "X min read" on blog posts
- Character limits — Check text against platform character limits
Frequently Asked Questions
How is reading time calculated?
Based on an average reading speed of 238 words per minute (Brysbaert 2019). The result is rounded to the nearest second.
How are sentences detected?
Sentences are split on `.`, `!`, and `?` characters. This is a simple heuristic and may not handle abbreviations (e.g., "U.S.A.") perfectly.
Start using Word Counter now
Get your free API key and make your first request in under a minute.