Count tokens for any AI model
Your text never leaves your browser. All counting happens locally. Learn more
What Are Tokens?
Tokens are the fundamental units that AI language models use to process text. When you send a prompt to ChatGPT, Claude, or any other LLM, your text is first broken down into tokens before the model can understand it.
A token can be as short as one character or as long as one word. For example, the word "hamburger" gets split into
"ham", "bur", and "ger" — that's 3 tokens.
Common words like "the" are typically a single token.
Understanding token counts matters because AI providers charge based on tokens, and every model has a maximum context window (the total tokens it can process at once). Knowing your token count helps you optimize prompts, estimate costs, and stay within model limits.
Model Comparison
Different models use different tokenizers, which means the same text produces different token counts.
| Model | Provider | Vocab | Context | Accuracy |
|---|---|---|---|---|
| Claude Opus 4.6 | Anthropic | ~100K | 200K | Approx |
| Claude Sonnet 4.6 | Anthropic | ~100K | 200K | Approx |
| Claude Haiku 4.5 | Anthropic | ~100K | 200K | Approx |
| GPT-5.4 Pro | OpenAI | 200K | 1M | Exact |
| GPT-5.4 Thinking | OpenAI | 200K | 1M | Exact |
| GPT-5.3 Instant | OpenAI | 200K | 400K | Exact |
| Gemini 3.1 Pro | 256K | 1M | Estimate | |
| Gemini 3.1 Flash-Lite | 256K | 1M | Estimate | |
| Gemini 3.1 Deep Think | 256K | 1M | Estimate | |
| Mistral Large 3 | Mistral | 131K | 256K | Approx |
| Ministral 14B | Mistral | 131K | 256K | Approx |
| Ministral 8B | Mistral | 131K | 256K | Approx |
| Llama 4 Scout | Meta | 128K | 10M | Approx |
| Llama 4 Maverick | Meta | 128K | 1M | Approx |
| Llama 3.1 405B | Meta | 128K | 128K | Approx |
| DeepSeek R1 | HuggingFace | 128K | 128K | Approx |
| Qwen 2.5 | HuggingFace | 128K | 128K | Approx |
| SmolLM2 | HuggingFace | 49K | 8K | Approx |
| Grok-4.1 Fast | xAI | 131K | 2M | Approx |
| Grok-4.1 | xAI | 131K | 256K | Approx |
| Grok-4 Heavy | xAI | 131K | 256K | Approx |
Frequently Asked Questions
What is a token?
A token is a chunk of text that an AI model processes. It can be a word, part of a word, or even a single character. For example, "tokenization" might be split into "token" and "ization" — that's 2 tokens. Most English words are 1-3 tokens.
Why do different models have different token counts?
Each AI model uses its own tokenizer with a different vocabulary and algorithm. A model with a larger vocabulary (like Gemini with 256K tokens) can represent more words as single tokens, resulting in fewer total tokens for the same text. The tokenizer is trained on different data, so efficiency varies by language and content type.
Is my text stored or sent anywhere?
No. All token counting happens entirely in your browser using JavaScript. Your text never leaves your device. You can verify this by opening your browser's Developer Tools (F12) and checking the Network tab — you'll see zero requests when you type.
How accurate are the token counts?
OpenAI models show exact counts using the official tiktoken tokenizer. Other models show approximate counts because their tokenizers aren't publicly available as client-side libraries. Approximations are typically within 5-15% of the actual count.
What is a context window?
The context window is the maximum number of tokens a model can process in a single conversation — including both your input (prompt) and the model's output (response). For example, GPT-5.4 Pro has a 1M token context window.
How many tokens is 1,000 words?
In English, 1,000 words is roughly 1,300-1,500 tokens for most models. The exact number depends on the complexity of the words and the specific tokenizer. Code tends to use more tokens per word than prose.