What this tool tells you
A language model never sees your text. It sees tokens: fragments produced by a byte-pair encoder that was trained on a corpus and then frozen. Billing, rate limits and the context window are all measured in those fragments, so the token count is the only unit that matters commercially. This page gives you that number for a block of text, and the price of sending it to each model we track.
Almost every token counter on the web divides your character count by four. That shortcut is roughly right for English prose and badly wrong for everything else — which is unfortunate, because the payloads that dominate real API bills are JSON, source code, transcripts and non-English text, and all four break the assumption. Here the text is run through the actual encoding, in your browser, with nothing sent anywhere.
Exact counts and honest estimates
Every model on this page carries one of two badges, and the distinction is not cosmetic.
- Exact — OpenAI publishes its tokenizers. The page loads the same
o200k_baseorcl100k_baseencoding the API uses and runs it over your text. The number is the number. - Estimate — Anthropic, Google and DeepSeek do not ship a tokenizer that runs in a browser. Anthropic offers only a server-side endpoint; Gemini’s SentencePiece vocabulary has no browser build. For those models the text is encoded with
o200k_baseand scaled by a documented factor, and the page says so on the model, in the table, and in the note beneath the readout.
Sites that present a scaled tiktoken count for Claude as though it were a real Claude count are not being more accurate than this one. They are being less transparent about the same limitation. The full derivation of every factor is on the methodology page.
How to read the result
The headline figure is your text alone. Your actual request will be larger, often much larger, because the context window is a single budget shared by everything in the call: the system prompt, every earlier turn in the conversation, tool and function definitions, any attached documents, and the model’s own reply. A 300 token user message inside an agent loop can easily sit in a 40,000 token request.
The characters per token figure is the one worth watching over time. English prose lands near 4.0. If your production prompts sit at 2.5, you are paying a structural tax — usually indentation, repeated JSON keys, or base64 — and that is a fixable cost rather than a fact of life. Drop a real payload into the tokenizer playground to see precisely which characters are eating the budget.
Mistakes that cost money
Budgeting from a character estimate
Characters ÷ 4 understates a minified JSON payload by 30–50%. Teams that size a contract on that basis discover the gap in the second month, at scale.
Forgetting that output is priced separately, and higher
Output typically costs four to six times input, because it is generated one token at a time rather than processed in a single parallel pass. A concise model at a higher headline price is often cheaper in production than a cheap model that rambles. Model both sides in the cost calculator before you decide.
Assuming the count transfers between models
It does not. Different providers train different vocabularies, and even one provider changes them between generations — Anthropic has stated that the tokenizer introduced with Claude 4.7 yields roughly 30% more tokens for the same text than the one before it. Re-measure whenever you switch models, and re-check your assumptions before you migrate a workload.
Ignoring the language mix
The vocabularies are English-heavy. The same paragraph in a non-Latin script can cost two to four times more tokens. For a product serving several markets, token cost per user is not uniform across them, and pricing built on an English average will be wrong where it matters.
Where your text goes
Nowhere. This site is a set of static files with no server to receive anything. The tokenizer is a JavaScript module that runs on your device; you can put the page in a browser tab, disconnect from the network, and it keeps counting. That matters if the text you are measuring is a customer record or an unreleased prompt, which — for anyone doing this work seriously — it usually is.