★ Claude · token counter
Claude Token Counter
Anthropic doesn't publish Claude's tokenizer, so no browser tool can count Claude tokens exactly. This page gives a clearly labelled estimate, the input cost per call on each current Claude model, and how much of the context window you're using.
- Runs in your browser
- No signup
- 306
- Characters
- 54
- Words
- —
- Tokens / word
Tokens per word uses the o200k_base count. Characters count emoji and accented letters as one each.
Tokens
…
Estimated with o200k_base as a stand-in. Claude's own tokenizer isn't available in the browser.
Context window used
—
1M tokens window on Claude Sonnet 5.5.
Input cost per call
—
Per 1,000 calls
—
Every model, same text
| Model | Tokens | Accuracy | Input / call |
|---|---|---|---|
| Claude Fable 5.1Anthropic | … | ≈ Estimate | — |
| Claude Opus 5.5Anthropic | … | ≈ Estimate | — |
| Claude Sonnet 5.5Anthropic | … | ≈ Estimate | — |
| Claude Haiku 5.5Anthropic | … | ≈ Estimate | — |
| GPT-6 AstraOpenAI | … | ✓ Exact | — |
| GPT-6.1 SolOpenAI | … | ✓ Exact | — |
| GPT-6 LunaOpenAI | … | ✓ Exact | — |
| Gemini 4 ArgonGoogle | 77 | ≈ Estimate | $0.00015 |
| Gemini 3.8 FlashGoogle | 77 | ≈ Estimate | $0.00006 |
| Gemini 3.1 Flash-LiteGoogle | 77 | ≈ Estimate | $0.00002 |
| Mistral Large 4Mistral | … | ≈ Estimate | — |
| Mistral Small 4Mistral | … | ≈ Estimate | — |
| DeepSeek V4.1 FlashDeepSeek | 92 | ≈ Estimate | $0.00003 |
| DeepSeek V4 ProDeepSeek | 92 | ≈ Estimate | $0.00012 |
| Llama (open weights)Meta | … | ≈ Estimate | — |
OpenAI rows use o200k_base, exact for that tokenizer. tiktoken hasn't mapped GPT-6 model names yet, so OpenAI hasn't confirmed GPT-6 uses it. Input cost is list price for your text alone, before system prompts, caching or output.
See the tokens
o200k_base
Loading the tokenizer…
Your tokens on Claude Sonnet 5.5.
Prompts eating your context window? I build RAG and prompt pipelines that use a fraction of the tokens.
How Claude tokenizes
Claude uses its own byte-level tokenizer, and Anthropic doesn't ship it as a library. The only exact source is Anthropic's token-counting endpoint, which needs an API key and returns the count for a specific model.
Tokenizers also change between model generations, so the same text can produce a different count on a newer Claude model than on an older one. Count with the model you will actually call.
Exact or estimate?
Estimate. We count your text with o200k_base, a modern 200k-vocabulary tokenizer, and use that as a stand-in. Claude's tokenizer is different, so treat the number as a ballpark, not a bill.
For an exact number, call Anthropic's count_tokens endpoint with the model you plan to use. Anthropic's docs describe it as free to use, subject to its own rate limits, and note that even its count can differ slightly from the final billed input.
Current Claude models
Context windows and input prices from the pricing data used across these tools.
| Model | Context window | Input / 1M |
|---|---|---|
| Claude Fable 5.1 | Not published | $10 |
| Claude Opus 5.5 | 1M tokens | $4 |
| Claude Sonnet 5.5 | 1M tokens | $2 |
| Claude Haiku 5.5 | 1M tokens | $0.10 |
Quirks worth knowing
- Code, JSON and non-English text usually take more tokens per character than plain English prose. That holds for Claude too.
- System prompts, tool definitions and images all count as input tokens on top of your message text.
- If you are close to a budget, leave headroom: an estimate can be off in either direction.
Sources: Claude docs: Token counting
Questions people actually ask
Can I count Claude tokens exactly in the browser?
Do all Claude models count tokens the same way?
Is the count_tokens endpoint free?
Which counts on this page are exact?
Is my text sent anywhere?
Count by model family
- GPT token counter
- Gemini token counter
- Llama token counter
- DeepSeek token counter
- Mistral token counter
Or compare every family at once on the main token counter.
More from the workbench
Fine print
Tools: on the house.
Engineer: by the hour.
Counting tokens was free. Spending fewer of them is a project.
I'm Himanshu, an AI and full-stack engineer. I build MVPs, AI agents and the growth plumbing around them for early-stage startups.
