What is a token?
Language models read text as tokens: chunks of characters from a fixed vocabulary. In English, one token is about 4 characters or three-quarters of a word, so 1,000 tokens is roughly 750 words. Code, numbers, non-English text and unusual words use more tokens per character.
Why counts differ between models
Each model family has its own tokenizer, so the same text gives a different count on GPT, Claude and Gemini.
- OpenAI: GPT-4o, GPT-4.1, the o-series and GPT-5 use the
o200k_baseencoding. This page counts it exactly with the open-sourcegpt-tokenizerlibrary. Newer OpenAI models may use a different encoding. - Claude: Anthropic does not publish its tokenizer. Recent Claude models use roughly 1 to 1.35 times as many tokens as older ones, so the range shown is an estimate. For an exact count, use the
count_tokensendpoint of the Claude API. - Gemini: also an estimate. Use the
countTokensmethod of the Gemini API for an exact count.
Why token counts matter
API prices are per million tokens, and every model has a context window limit measured in tokens. Count your prompt, then use the LLM cost calculator to see what it costs at scale.
Is my text private?
Yes. Tokenizing happens in your browser. The text you paste is not uploaded or stored.