← Text

Word and Character Counter

Count words and characters instantly in your browser. Nothing leaves your device.

0 Words
0 Characters
0 Characters (no spaces)
0 Sentences
0 Paragraphs
Use this tool from AI agents

This tool's engine is available to AI agents over MCP as count_text. Add the Clean.tools server, then your agent can call it directly.

Claude Code
claude mcp add --transport http clean-tools https://mcp.clean.tools/mcp
Claude Desktop (mcpServers)
{"mcpServers":{"clean-tools":{"command":"npx","args":["-y","@clean-tools/mcp"]}}}
Cursor
https://mcp.clean.tools/mcp

Or call it over plain HTTP from any script. Same engine, JSON in and JSON out, no key:

curl
curl -s https://api.clean.tools/v1/count_text \ -H 'content-type: application/json' \ -d '{"text":"The quick brown fox jumps over the lazy dog."}'
JavaScript
const res = await fetch("https://api.clean.tools/v1/count_text", { method: "POST", headers: { "content-type": "application/json" }, body: JSON.stringify({ text: "The quick brown fox jumps over the lazy dog." }) }); const data = await res.json();

How it works

This free word and character counter runs entirely in your browser. Paste or type text into the field above and see live counts for words, characters, characters without spaces, sentences, and paragraphs. Nothing is sent to a server or stored anywhere.

It is useful for checking social media post limits, essay word counts, SEO meta description lengths, and any situation where you need an accurate count fast. Works on mobile and desktop, on any modern browser.

If you need the same counts from a script or an AI agent, the same engine is available as the count_text word-counter API and as an MCP server; you can call it over HTTP or install the @clean-tools/mcp package from npm.

Frequently asked questions

How does it count characters like emoji and accented letters?

Characters are counted as graphemes, so a flag emoji, a skin-tone emoji, or an accented letter like "é" each count as one character even when they are stored as several code units internally. Where your browser supports it, counting uses Intl.Segmenter for accurate results.

How is a sentence counted, and does it handle abbreviations?

Sentences are split on the boundaries between them, and common abbreviations such as "Dr.", "Mr.", "etc.", and "vs." are treated as part of the sentence rather than as an ending. Unusual punctuation or missing spaces can still cause an off-by-one result, so treat the sentence count as a close estimate.

What counts as a word?

A word is any run of letters or digits, so "don't" and "state-of-the-art" segment by their internal punctuation and numbers like "3.14" are included. Standalone punctuation and whitespace are not counted as words.

Is my text uploaded anywhere?

No. All counting happens in your browser using plain JavaScript, and your text is never sent to a server or stored. You can confirm this by loading the page and then going offline: it keeps working.

Can I use this from the command line or an AI agent?

Yes. The same counting engine is available as a REST endpoint at https://api.clean.tools/v1/count_text, so you can POST text to it from any script and get JSON back. It is also an MCP server you can add to Claude, Claude Code, or Cursor so an agent can count text directly. The @clean-tools/mcp package on npm runs that same server locally over stdio.

More tools from Clean.tools

View all tools

Use Clean.tools from your AI agent

This tool is also count_text on the Clean.tools MCP server — the same engine, callable by your AI agent directly. No key, no signup: requests are processed in memory and request contents are never stored.

Claude Code
claude mcp add --scope user --transport http clean-tools https://mcp.clean.tools/mcp
Any MCP client (streamable HTTP, authless)
https://mcp.clean.tools/mcp

Every tool, the REST API, and setup for Cursor, Claude Desktop, VS Code & more →