Tool
AI token counter
Paste text to count tokens across 21 major models, check context-window fit and estimate per-request input cost.
Text to count
Processing: text is posted to this site’s own counting endpoint and discarded — nothing stored. If the endpoint is unreachable the page falls back to a flagged local estimate. Do not paste keys or credentials.
Counts update as you type. OpenAI rows are exact; other vendors are estimates because their tokenizers are not public.
Per-model counts, context fit and input cost
| Model | Tokens | Context use | Input cost / 1K calls | Tokenizer |
|---|---|---|---|---|
| GPT-6.1 SolOpenAI | — | — | — | tiktoken o200k_base |
| GPT-6 SolOpenAI | — | — | — | tiktoken o200k_base |
| GPT-6 LunaOpenAI | — | — | — | tiktoken o200k_base |
| GPT-6 AstraOpenAI | — | — | — | tiktoken o200k_base |
| GPT-5.2OpenAI | — | — | — | tiktoken o200k_base |
| Claude Opus 5.5Anthropic | — | — | — | Claude tokenizer (unpublished) |
| Claude Sonnet 5.5Anthropic | — | — | — | Claude tokenizer (unpublished) |
| Claude Haiku 5.5Anthropic | — | — | — | Claude tokenizer (unpublished) |
| Claude Fable 5.1Anthropic | — | — | — | Claude tokenizer (unpublished) |
| Gemini 3.1 ProGoogle | — | — | — | Gemini SentencePiece (est.) |
| Gemini 3 FlashGoogle | — | — | — | Gemini SentencePiece (est.) |
| Gemini 3.1 Flash-LiteGoogle | — | — | — | Gemini SentencePiece (est.) |
| DeepSeek V4-FlashDeepSeek | — | — | — | DeepSeek BPE (est.) |
| DeepSeek V4-ProDeepSeek | — | — | — | DeepSeek BPE (est.) |
| Qwen3.8-MaxAlibaba | — | — | — | Qwen BPE (est.) |
| Qwen3.8-FlashAlibaba | — | — | — | Qwen BPE (est.) |
| GLM-5.3Zhipu Z.ai | — | — | — | GLM BPE (est.) |
| Kimi K3Moonshot AI | — | — | — | Kimi BPE (est.) |
| Grok 4.7xAI | — | — | — | Grok BPE (est.) |
| Mistral Large 3Mistral AI | — | — | — | Mistral Tekken (est.) |
| MiniMax-M3MiniMax | — | — | — | MiniMax BPE (est.) |
Cost = tokens × official input list price, per 1,000 requests containing this exact text. Cache hits, batch lanes and output tokens are not included.
Agent context breakdown
Processing: counted locally in this tab with gpt-tokenizer (o200k_base) — nothing leaves the browser. Approximate — real counts differ per model. Do not paste keys or credentials.
Tokenizer: gpt-tokenizer o200k_base (loaded on first edit). Per-round cost = resent tokens × the selected model’s list input price.
How the counting works
OpenAI rows use tiktoken locally on this server — the same BPE encoding the API uses — so o200k_base (current GPT models) and cl100k_base (GPT-4/3.5 era) counts are exact for raw text. Anthropic, Google, DeepSeek, Alibaba, Zhipu, Moonshot, MiniMax, xAI and Mistral have not published their tokenizers; their rows take the o200k count and apply a documented per-family factor, and are marked as estimates.
Token totals cover only the pasted text. Chat APIs add per-message overhead (roles, formatting), tool/JSON schemas count toward input, and cached prefixes may bill at a lower rate — check vendor docs for the final number. Nothing you paste is stored.
FAQ
Which counts are exact and which are estimates?
OpenAI models are counted with tiktoken — o200k_base for current models, cl100k_base for legacy GPT-4/3.5 — so those numbers are exact. Other vendors have not published their tokenizers; their rows are estimates scaled from the o200k count by a per-family factor, and the table marks them as estimates.
Why do two tokenizers count the same Chinese text differently?
Vocabulary coverage. cl100k splits many Chinese characters into multiple tokens, while o200k and Chinese-trained vocabularies merge common characters and words — the same string can differ by 30% or more between families.
Does this count message overhead like role names and tool schemas?
No. It counts the raw text you paste. Real chat requests add a few tokens per message for roles and formatting, and tool/JSON schemas count too — the exact recipe varies by vendor and is not public for all of them.
Is my text uploaded anywhere?
The text is sent to this site's own counting endpoint and discarded immediately — nothing is stored or logged. If the endpoint is unreachable the page falls back to a rough in-browser estimate, clearly flagged.