Token Counter & Visualizer
Paste any text and see how each model family tokenizes it. GPT counts are exact (tiktoken runs in your browser); Claude, Gemini, and Llama use calibrated estimates. Nothing is uploaded.
Token visualization (GPT-4o / GPT-5)
Each colored chunk is one token (o200k_base).How this works
GPT-4o and GPT-5 use the o200k_base encoding;
GPT-4 and GPT-3.5 use cl100k_base. Both are
tokenized exactly here using
gpt-tokenizer,
a pure-JavaScript port of OpenAI's tiktoken — it runs entirely in your
browser, so your text is never sent anywhere.
Claude, Gemini, and Llama don't publish a JavaScript
tokenizer, so their counts here are calibrated estimates
based on each family's average characters-per-token ratio. They're close
enough to compare relative cost, but for exact billing use each vendor's
own tokenizer or the usage field on a real API response.
Why token counts differ between models
Each model family trains its own byte-pair-encoding vocabulary, so the same sentence can split into a different number of tokens. Anthropic's newest tokenizer (Claude Opus 4.7) uses up to ~35% more tokens for the same English text than older encodings — which is why "cheaper per token" doesn't always mean "cheaper per request." To turn token counts into dollars, use our LLM Cost Calculator.