OpenAI Tokenizer
Count tokens the way OpenAI does. This tool runs OpenAI’s o200k_base tokenizer — used by every GPT-5 model, GPT-4.1, GPT-4o and the o-series — right in your browser, then shows what the prompt costs on each model, including GPT-6.
- ✓ Prices checked Nov 17, 2026
- ✓ Exact Claude counts via Anthropic’s API
- ✓ Exact GPT-5 counts
- ✓ No signup
| Model | Tokens | Est. cost |
|---|---|---|
| GPT-6.1 SolOpenAI | 0estimate | $0 |
| GPT-6.1 TerraOpenAI | 0estimate | $0 |
| GPT-6 AstraOpenAI | 0estimate | $0 |
| GPT-6 LunaOpenAI | 0estimate | $0 |
| GPT-5.6 SolOpenAI | 0exact | $0 |
| GPT-5.5OpenAI | 0exact | $0 |
| GPT-5.4 miniOpenAI | 0exact | $0 |
| Claude Fable 5.2Anthropic | 0exact | $0 |
| Claude Opus 5.5Anthropic | 0exact | $0 |
| Claude Sonnet 5.5Anthropic | 0exact | $0 |
| Claude Haiku 5.5Anthropic | 0exact | $0 |
| Gemini 4 CarbonGoogle | 0estimate | $0 |
| Gemini 4 ArgonGoogle | 0estimate | $0 |
| Gemini 4 HydrogenGoogle | 0estimate | $0 |
| Gemini 3.8 FlashGoogle | 0estimate | $0 |
| Gemini 3.1 Pro (preview)Google | 0estimate | $0 |
| Gemini 3.1 Flash-LiteGoogle | 0estimate | $0 |
Prices per 1M tokens, standard tier, last checked 2026-11-17. Estimated cost = input tokens × input price + output tokens × output price, times the number of requests. Exact = the provider’s own tokenizer; estimate = the provider hasn’t published its tokenizer, so the count is approximated.
Frequently asked questions
Which tokenizer do GPT-5 models use?
GPT-5 models (including GPT-5.5 and GPT-5.6), GPT-4.1, GPT-4o and the o-series reasoning models use the o200k_base encoding, which is what this tool runs, so those counts are exact.
Are the GPT-6 token counts exact?
Not yet. OpenAI hasn’t published the GPT-6 tokenizer, so GPT-6 counts are estimated from the GPT-5 tokenizer and marked “estimate”. We’ll switch them to exact as soon as the tokenizer is public.
Is my text stored?
No. OpenAI token counts are calculated entirely in your browser. For exact Claude counts, your text is sent to Anthropic’s token counting API and the result is returned to you. We do not log or store the text.
Why do different models give different token counts for the same text?
Each provider uses its own tokenizer — the rules that split text into tokens. The same sentence can be 100 tokens for GPT and 115 for Claude. Code, non-English text and emoji usually differ the most.