Estimate how many tokens your text uses in Claude, with context-window usage and API cost.
How many tokens will your text use in Claude? Anthropic has not published Claude’s tokenizer for offline use, so this counter gives a careful estimated range based on OpenAI’s open-source tokenizer, shows how much of Claude’s context window your prompt fills and what it costs at current Claude API prices — and explains how to get the exact count from Anthropic’s token-counting API.
o200k_base for GPT-4o, GPT-4.1, GPT-5 and newer OpenAI models; cl100k_base for GPT-4 and GPT-3.5; or Claude / Gemini estimates.
Counts update as you type: tokens, characters, words and tokens per word.
Each token is highlighted so you can see how words are split.
Choose a model price and context size to see what the prompt costs and how much of the window it fills.
Exact OpenAI token counts (o200k_base and cl100k_base) — the same encodings used by OpenAI’s tiktoken library
Token-by-token visualisation
Input cost using prices checked against official pricing pages
Private: text is tokenised in your browser
Turn your token counts into a daily and monthly API bill across providers.
| Text | Roughly |
|---|---|
| 1 token | ≈ 4 characters of English, or ¾ of a word |
| 100 tokens | ≈ 75 words |
| 1,000 tokens | ≈ 750 words, about 1½ pages |
| 128,000 tokens | ≈ a 300-page book |
These are rules of thumb for English; code, numbers and other languages differ, which is why the exact count matters for long prompts.
count_tokens).countTokens method.tiktoken library — the same encodings used on this page.Estimate a monthly bill with the AI API cost calculator.
A token is a chunk of text a model processes as one unit — often a whole common word, part of a longer word, a number or punctuation. In English, one token averages roughly four characters or three-quarters of a word, but this varies with language and content.
According to OpenAI’s tiktoken library, GPT-4o, GPT-4.1, GPT-4.5, GPT-5 and the o-series reasoning models use o200k_base, while GPT-4 and GPT-3.5-turbo use cl100k_base. Newer models not yet listed in tiktoken are counted with o200k_base here.
No. Anthropic and Google do not publish their tokenizers for offline use, so the counter shows an estimated range. For exact numbers use Anthropic’s token-counting API or Google’s countTokens API.
Yes. API bills include input and output tokens, and output tokens usually cost several times more. Compare full request costs with the AI API cost calculator.
Tokenizers are trained mostly on English, so other languages and scripts are often split into more, shorter tokens.