Free tool·runs in your browser · your text is never sent anywhere

Token counter

Paste anything and see how many tokens it is, what it costs to send, and whether it fits the model you are about to send it to. Counts update as you type, with per-family tokenizer scaling for Claude, GPT, and Gemini.

Your text
Tokens (estimate) 0
Characters0
Words0
Lines0
Chars per token
as input$0
as cached input$0
as output$0

An estimate, within roughly 10 to 15%. For an exact count use Anthropic's count_tokens endpoint or OpenAI's tokenizer.

01 · What a token is

Not a word, not a character, and not the same twice.

Tokens are the units a model reads and bills in. Getting the count roughly right is the difference between a prompt that fits and a bill that surprises you.

A token is a fragment the model learned to treat as one piece

Before a model sees your text, a tokenizer splits it into pieces drawn from a fixed vocabulary of usually 100,000 to 200,000 entries. Common English words are a single token. Rarer words break into two or three. A space is normally attached to the word that follows it, which is why " the" and "the" are different tokens. Punctuation, digits, and emoji are each one or more tokens on their own.

The practical rules of thumb for English prose: about four characters per token, about 0.75 words per token. A thousand words is therefore around 1,300 tokens. Code is denser, closer to three characters per token, because brackets, operators, indentation, and camelCase identifiers each split into several pieces. Chinese, Japanese, and Korean run near one token per character, so the same meaning costs two to three times more tokens than it would in English.

Why the same text counts differently on Claude and GPT

Every family trains its own tokenizer on its own corpus, so the vocabularies differ and the splits differ. Usually the gap is a few percent and you can ignore it. Right now there is one gap you cannot: Anthropic states that the tokenizer introduced with Claude Opus 4.7, and used by Opus 4.8, Opus 5, Sonnet 5 and Fable 5, produces roughly 30 percent more tokens for the same text than earlier Claude models.

Anthropic's own context figures make the size of that concrete. A 1M-token window holds about 750,000 words on Claude Sonnet 4.6, and about 555,000 words on Claude Sonnet 5. Same window, same language, 35 percent fewer words. That is why this tool scales its estimate per family rather than printing one number: a prompt measured on Sonnet 4.6 and reused as a budget for Sonnet 5 will be a third short, and a context-window check done the old way will tell you something fits when it does not.

How this estimator works, and where it is wrong

It is a character-density heuristic running entirely in your browser. It separates CJK characters, which it counts at about one token each, from everything else. For the rest it divides the character count by a divisor that slides between 3.9 for running prose and 3.0 for dense code or markup, chosen from how much of your text is brackets, operators, digits, and line breaks. It then applies a per-family multiplier, the only one of which is Anthropic's documented step for Claude Opus 4.7 and later.

That lands within roughly 10 to 15 percent on English prose and mainstream programming languages. It will be further off on heavily mixed scripts, on base64 or minified blobs, and on anything with unusual Unicode. It also counts only your text: the real request adds a system prompt, tool schemas, and message framing, and on a tool-using request those alone are commonly 300 to 800 tokens before your content. When the number has to be exact, count it against the model you plan to use with Anthropic's count_tokens endpoint (free, and it accepts tools, images, and PDFs) or OpenAI's tokenizer page.

02 · Context windows

How much fits, and what it costs to fill.

Context window and max output are separate limits: the window is everything the model reads, the output cap is the most it can write in one reply. Both were read off each provider's own model documentation on 19 August 2026. Input and output prices are US dollars per million tokens.

Context window, max output, and per-million-token price, by model. checked 19 aug 2026
Context window, max output, and per-million-token pricing by model, verified 19 August 2026
Model Context window Max output Input Output
Anthropic
Claude Fable 51,000,000128,000$10$50
Claude Opus 51,000,000128,000$5$25
Claude Opus 4.81,000,000128,000$5$25
Claude Opus 4.61,000,000128,000$5$25
Claude Sonnet 51,000,000128,000$2$10
Claude Sonnet 4.61,000,000128,000$3$15
Claude Haiku 4.5200,00064,000$1$5
Claude 4.6 and later carry the full 1M window at standard pricing, so a 900K-token request costs the same per token as a 9K one. Fable 5, Opus 5, Opus 4.8 and Sonnet 5 use the Opus 4.7 tokenizer: the same document is about 35 percent more tokens than on Sonnet 4.6, so the window holds about 555,000 English words instead of about 750,000.
OpenAI
GPT-5.6 Sol1,050,000128,000$5$30
GPT-5.6 Terra1,050,000128,000$2$12
GPT-5.6 Luna1,050,000128,000$0.20$1.20
A request that crosses OpenAI's long-context threshold bills the whole request at a surcharge: Sol goes to $10 input and $45 output.
Google, xAI, and others
Gemini 3.1 Pro Preview1,048,57665,536$2$12
Grok 4.6500,000$2$6
Grok 4.31,000,000$1.25$2.50
DeepSeek V4 Pro1,000,000384,000$1.32$3.96
DeepSeek V4 Flash1,000,000384,000$0.44$1.32
Kimi K31,048,576$3$15
Kimi K2.7 Code262,144$0.95$4
Qwen3.8 Max1,000,000$2$6
Gemini 3.1 Pro and every Grok 4.x model use their standard tier at 200K prompt tokens or fewer; above 200K the whole request bills at double. DeepSeek prices are peak rates and halve outside 01:00 to 04:00 and 06:00 to 10:00 UTC. A dash means the provider does not publish that figure per model. The full rate card for all 35 models is on the pricing calculator.
03 · Questions

Short answers.

The four things people ask before they trust a token count.

Roughly 1,300 to 1,400 tokens of ordinary English prose on an OpenAI or Google tokenizer. On Claude Sonnet 5, Opus 5, and Fable 5, which use the tokenizer introduced with Claude Opus 4.7, expect closer to 1,800. Code runs denser: the same 1,000 words of source is usually 1,600 to 2,000 tokens, because brackets, operators, and indentation each cost a token.

Each family ships its own tokenizer with its own learned vocabulary, so the same string splits into a different number of pieces. Usually the gap is a few percent. The exception worth knowing: Anthropic states the tokenizer introduced with Claude Opus 4.7 produces about 30 percent more tokens than earlier Claude models. Their own figures put a 1M window at about 750,000 words on Sonnet 4.6 and about 555,000 on Sonnet 5.

Within roughly 10 to 15 percent for English prose and mainstream programming languages. It is a character-density heuristic, not a real tokenizer, so it cannot be exact without shipping a multi-megabyte vocabulary per family. It also counts only your text: a real request adds a system prompt, tool schemas, and message framing on top. For a billing-grade number, use Anthropic's count_tokens endpoint, which is free.

No. The estimate is computed in your browser from the characters you typed. This page makes no network request with your text, has no server component, and stores nothing. Turn off your network connection and it still works, which is the easiest way to prove it.

04 · The real number

One prompt is easy.
A month of them is the bill.

Counting a prompt tells you what one request costs. Continuum's usage analytics tells you what a month of agent work actually cost, priced per model straight off the Claude Code and Codex history already on your machine, broken down by repo and day. Want to skip provider keys entirely? Hosted inference is $25 a month with a flat weekly allowance.

free app · your own keys · nothing leaves your machine