Token counter and GPT tokenizer
Paste your prompt or document to get an exact OpenAI token count (o200k_base or cl100k_base), plus estimates for Claude and Gemini and the input cost. Counting happens in your browser; your text never leaves the page. Part of our tokens and context windows section; to price a workload use the LLM API cost calculator.
By the Chelure Enterprises Editorial Team. Last reviewed . How we check our sources.
What is a token?
Language models do not read letters or words directly. They read tokens: chunks of text that might be a whole short word, part of a longer word, a number, or a punctuation mark. Common English words are often a single token, while rare words, code, and non-Latin scripts usually take several. Providers bill by tokens, and context limits are measured in tokens too.
How the counts are produced
OpenAI (exact). The counter runs the same byte-pair-encoding algorithm as OpenAI's open-source tiktoken library, in your browser, using the public o200k_base and cl100k_base vocabularies. We checked it against tiktoken on more than 1,600 test strings in English, German, Russian, Chinese, Japanese, Arabic, emoji, code and whitespace edge cases, and the token ids matched every time. The vocabulary (about 1.7 MB for cl100k_base, 3.6 MB for o200k_base) is downloaded once, only when you first paste text; the text itself is never uploaded.
Which encoding for which model. tiktoken maps GPT-4o, GPT-4.1, GPT-5 and the o-series to o200k_base, and GPT-4 and GPT-3.5 to cl100k_base. For newer OpenAI models we have not seen a published encoding, so treat the count as exact for the encoding you choose and confirm billing with OpenAI. Special tokens such as <|endoftext|> are counted as ordinary text.
Claude and Gemini (estimates). Anthropic and Google do not publish their tokenizers as downloadable vocabularies, so those figures divide the character count by an average characters-per-token value (about 4 for Gemini, about 3.2 for Claude's newer tokenizer) and add a surcharge for non-ASCII characters. They are good for budgeting. Use each provider's token-counting API when billing accuracy matters.
Rules of thumb
- One token is roughly four characters of English text for OpenAI-style tokenizers.
- One hundred tokens is about seventy-five English words.
- Code, tables, JSON and non-English text use more tokens per word than plain English prose.
Need the reverse? Use the tokens to words converter, or price a workload with the cost calculator.
Frequently asked questions
Is this token count exact?
No. It is an estimate based on character counts, adjusted for non-English text. Each provider uses its own tokenizer, so exact counts need the provider's tokenizer or token-counting API. Expect the estimate to be off by roughly ten to twenty percent on typical English prose, and more on code or unusual text.
Is my text uploaded anywhere?
No. The counting runs entirely in your browser. Nothing you paste is sent to our server.
Why does Claude show more tokens than GPT for the same text?
Anthropic states that its newer tokenizer, used by Claude 4.7 and later, produces about 30% more tokens for the same text than earlier Claude models. The estimate here uses a lower characters-per-token figure for Claude to reflect that.
Is the GPT count exact?
Yes for the encoding you select. The counter reproduces OpenAI's tiktoken algorithm and public vocabularies (o200k_base and cl100k_base) and matched tiktoken on every test string we tried. Which encoding a given OpenAI model uses is defined by OpenAI, so confirm for newer models.
How do I get an exact Claude or Gemini count?
Anthropic and Google provide token-counting endpoints in their APIs. Use those when billing accuracy matters; the Claude and Gemini figures here are estimates.
Cite this page: Token counter. Createchz AI Tools, verified November 13, 2026. https://createchz.com/tokens/token-counter/