How this token counter works
Large language models don't read words — they read tokens, chunks of a few characters produced by each model's tokenizer. Token counts decide what an API call costs, whether your prompt fits the model's context window, and how long a response can be. This counter gives you those numbers as you type.
For OpenAI models the count is exact: we run the same o200k and cl100k BPE encodings used by OpenAI's official tokenizer, verified to produce identical output. For Claude and Gemini, no official client-side tokenizer exists, so we estimate from each provider's own published ratios — about 3.5 characters per token for Claude and about 4 for Gemini — and clearly label those counts as estimates. The methodology page explains the full approach and its accuracy.
Unlike most token counters, everything here runs locally in your browser. Nothing you paste is uploaded, logged or stored — a real difference if you're counting tokens in contracts, medical notes or unreleased code.
What a token actually is
Every model family ships a fixed vocabulary built with byte-pair encoding (BPE). Training starts from raw bytes and repeatedly merges the most frequent adjacent pairs until the vocabulary reaches its target size — so common English words end up as single tokens, while rarer words are assembled from two or three pieces. "The" is one token; "tokenization" splits into several. When you type, the tokenizer greedily matches the longest vocabulary entries it can, which is why counts aren't something you can eyeball: they depend entirely on what happened to be frequent in the training data.
This is also why the same text costs different amounts on different models. A vocabulary tuned on more multilingual and code-heavy data packs that kind of text into fewer, larger pieces. Two models can disagree on the token count of one paragraph by a fifth or more — and since API pricing is per token, that difference flows straight through to your bill.
Why token counts matter
Two practical reasons. First, cost: every API request is billed on input tokens plus output tokens, so knowing your prompt's real size is the difference between estimating a workload and guessing at it. The table above prices your text as input across every model we track; the pricing calculator extends that to full request and monthly costs. Second, fit: each model has a hard context window covering your prompt and its reply combined. Across the registry that ranges from 16K tokens (Phi-4) to 10 million tokens (Llama 4 Scout) — the bar under the counter shows exactly how much of the selected model's window your text consumes, before you send anything.
Token counts also drive subtler decisions: how much conversation history an assistant can keep, how many retrieved documents fit in a RAG prompt, and when a long input quietly pushes you into a provider's long-context pricing tier. Counting first is the cheap way to find out.
Frequently asked questions
How many tokens is a word?
For English text, one word is roughly 1.3 tokens — or about 4 characters per token. 100 tokens works out to roughly 75 English words. Code, non-English languages and unusual formatting use more tokens per word because the tokenizer splits unfamiliar text into smaller pieces.
Are these token counts exact?
For OpenAI models, yes: we run the same o200k/cl100k BPE encodings as OpenAI's official tiktoken library, verified to produce identical token IDs. Claude and Gemini counts are estimates based on each provider's official guidance (about 3.5 characters per token for Claude, about 4 for Gemini) because neither publishes a client-side tokenizer — estimated counts are always labelled.
Does my text get uploaded anywhere?
No. The tokenizer runs entirely in your browser as JavaScript — there is no server, no account, and your text never leaves your device. You can verify this in your browser's network tab: no requests are made when you type.
How many tokens is a page of text?
A typical A4 page holds around 500 words, which is roughly 650–700 tokens of English prose. A 10-page document is therefore about 6,500–7,000 tokens — comfortably inside every current model's context window.
Why do different models count different tokens for the same text?
Each model family uses its own tokenizer with its own vocabulary. GPT-5 uses the o200k encoding, older GPT-4 models use cl100k, and Claude and Gemini use their own proprietary tokenizers. The same sentence can differ by 20–30% between models — which matters, because API pricing is per token.
What is a context window?
The maximum number of tokens a model can process in one request, covering your input and its output combined. Current models range from 128,000 tokens (GPT-4o) to over 1 million (GPT-5.6, Claude 5 models, Gemini). The bar under the counter shows how much of the selected model's window your text uses.
Do spaces, punctuation and emoji count as tokens?
Yes — everything you type is tokenized. A space usually attaches to the word that follows it as part of that word's token, so spaces rarely add extra tokens on their own. Punctuation is often its own token. Emoji and unusual Unicode characters can cost several tokens each, because the tokenizer falls back to encoding them byte by byte.
Why does code use more tokens than prose?
BPE vocabularies are trained on large text samples in which ordinary prose dominates, so common English words compress into single tokens while identifiers, brackets and indentation split into many small pieces. Newer encodings such as o200k handle code noticeably better than older ones, but code still averages more tokens per character than natural language — worth knowing before you paste a large file into a prompt.
More tools
VRAM calculator: can your GPU run a given open model? API pricing calculator: compare request and monthly costs across every major model.
Last updated 2026-09-03. Model specs and prices verified against official provider documentation; see the methodology.