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.

0GPT tokens
0Claude tokens
0words
0characters
ModelTokensPrice / 1M in · outEst. cost
GPT-6.1 SolOpenAI0estimate$2 · $10$4 / $15 above 272K-token prompts$0
GPT-6.1 TerraOpenAI0estimate$1 · $5$2 / $7.50 above 272K-token prompts$0
GPT-6 AstraOpenAI0estimate$10 · $50$20 / $75 above 272K-token prompts$0
GPT-6 LunaOpenAI0estimate$0.10 · $0.50$0.20 / $0.75 above 272K-token prompts$0
GPT-5.6 SolOpenAI0exact$4 · $20Promotional pricing until Nov 30, 2026 · $8 / $30 above 272K$0
GPT-5.5OpenAI0exact$5 · $30$10 / $45 above 272K-token prompts$0
GPT-5.4 miniOpenAI0exact$0.75 · $4.50$0
Claude Fable 5.2Anthropic0exact$8 · $40$0
Claude Opus 5.5Anthropic0exact$4 · $20$0
Claude Sonnet 5.5Anthropic0exact$2 · $10$0
Claude Haiku 5.5Anthropic0exact$0.10 · $0.50$0.50 / $2.50 above 100K-token prompts$0
Gemini 4 CarbonGoogle0estimate$2 · $10$4 · $20 from Dec 1, 2026$0
Gemini 4 ArgonGoogle0estimate$2 · $10$4 · $20 from Dec 1, 2026$0
Gemini 4 HydrogenGoogle0estimate$1.50 · $7.50$0
Gemini 3.8 FlashGoogle0estimate$0.75 · $3.75$1.50 · $7.50 from Jan 1, 2027$0
Gemini 3.1 Pro (preview)Google0estimate$2 · $12$4 / $18 above 200K-token prompts$0
Gemini 3.1 Flash-LiteGoogle0estimate$0.25 · $1.50$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.

Related tools