Token Counter
Paste a prompt or document to count its tokens, estimate the Claude count, and see how much of a context window it fills.
0 words · 0 characters · counted in your browser, never uploaded
OpenAI tokens (o200k_base)
0
Exact count with the GPT-4o tokenizer.
- Claude (estimate)
- ...
- Rule of thumb (characters / 4)
- 0
Claude's tokenizer is not public. Exact counts need Anthropic's token counting API.
Context window fill
- 8K0%
- 32K0%
- 128K0%
- 200K0%
- 1M0%
Bars use the higher Claude estimate so you do not underestimate. 200K matches Claude Haiku 4.5; 1M matches Claude Opus 5 and Sonnet 5.
Quick Answer
What Tokens Are and Why They Matter
Language models do not read words or letters. They read tokens: chunks of text from a fixed vocabulary. A short common word like "the" is one token, a longer word may be two or three, and a number like 1,234,567 can take several. Spaces usually attach to the start of the next word, which is why the token preview above shows many chips beginning with a space.
Tokens matter for three practical reasons. Context windows, the amount of text a model can consider at once, are measured in tokens. API prices are charged per token. And output limits cap how many tokens a model can write in one reply. Knowing your token count before you send a long document saves both errors and money.
How Many Tokens Per Word? Our Measurements
We ran the o200k_base tokenizer over our own published articles, with tables removed. Plain English prose averaged 1,348 tokens per 1,000 words. Articles full of numbers, like page-count guides, averaged 1,483. The same three topics written in different languages show how much the language changes the count:
| Language | Tokens per 1,000 words | vs. English |
|---|---|---|
| English | 1,508 | baseline |
| French | 1,547 | +3% |
| Spanish | 1,563 | +4% |
| Portuguese | 1,571 | +4% |
| Indonesian | 1,905 | +26% |
| Arabic | 2,000 | +33% |
| Turkish | 2,146 | +42% |
| Polish | 2,316 | +54% |
Measured in September 2026 on three matching articles per language (a page-count guide and two GPA guides), which contain more numbers than typical prose. Word counts use whitespace splitting.
OpenAI vs. Claude Token Counts
OpenAI publishes its tokenizers, so the GPT count here is exact. Anthropic does not publish Claude's tokenizer, and Claude's newer models use a tokenizer that produces more tokens than older ones for the same text. An OpenAI-style count typically lands 15 to 20% below Claude on English and further below on code or non-English text, so the tool shows Claude as a range of 1.15 to 1.35 times the GPT count.
When the exact Claude number matters, for example when you are close to a limit, call the token counting endpoint in Anthropic's API with the same model you will use. To see what a Claude context window holds in plain terms, read how many words fit in Claude's context window.
How to Use Fewer Tokens
- Cut boilerplate. Repeated instructions, signatures, and navigation text copied from web pages add tokens without adding meaning.
- Send the relevant part. Paste the chapter or section you need instead of the whole document.
- Watch numbers and tables. Long figures and table formatting split into many small tokens.
- Clean the text first. The Text Cleaner removes extra spaces and blank lines that still cost tokens.
A token is the unit of text a language model reads and writes. Common English words are often a single token, while long words, numbers, punctuation, and non-English text are split into several pieces. Models count limits and prices in tokens, not words.
In our measurement of English prose, 1,000 words came to about 1,350 tokens with OpenAI's o200k_base tokenizer. Text with many numbers ran closer to 1,500 tokens. Claude usually needs somewhat more tokens for the same text.
No. Anthropic has not published Claude's tokenizer, so no browser tool can count Claude tokens exactly. This tool shows an estimate range based on the OpenAI count. For an exact number, use the token counting endpoint in Anthropic's API with the model you plan to call.
The count uses o200k_base, the encoding OpenAI uses for GPT-4o and later GPT models. Older models such as GPT-4 and GPT-3.5 used cl100k_base, which usually produces a slightly higher count for the same English text.
Tokenizers are built mostly from English-heavy training data, so English words map to fewer, longer tokens. In our test on the same topics, Spanish and French used 3 to 4% more tokens than English, while Turkish used 42% more and Polish 54% more.
No. The tokenizer downloads to your browser the first time you type, and all counting happens on your device. Your text is never uploaded.
Related Guides
Sources & References
- OpenAI token counts use the o200k_base encoding via the open-source gpt-tokenizer package, running entirely in the browser.
- Claude estimates follow Anthropic's guidance that OpenAI tokenizers undercount Claude tokens, most on code and non-English text; exact counts require Anthropic's token counting API.
- Context window sizes: 1M tokens for Claude Opus 5 and Claude Sonnet 5, 200K tokens for Claude Haiku 4.5, per Anthropic's model documentation.