Free tool · AI Token counter for GPT, Claude, Gemini and DeepSeek
Paste a prompt, a help article or a whole document to see how many tokens it uses. OpenAI models are counted exactly with the same vocabularies the API uses; for other providers, which do not publish a browser tokenizer, the tool shows a labelled estimate from their own documentation.
- Exact o200k_base and cl100k_base
- Chinese and English compared
- Your text never leaves the page
Count tokens
The counts update as you type. The OpenAI vocabulary (about 1 MB) downloads the first time you edit the text and is cached by your browser after that.
Up to 300,000 characters are counted. Nothing you type is sent anywhere.
o200k_base is used by GPT-5, GPT-4.1, GPT-4o and the o-series; cl100k_base by GPT-4 and GPT-3.5 Turbo.
Tokens
75
Characters
322
Words
59
CJK characters
0
Characters per token
4.29
UTF-8 bytes
326
How the text is split o200k_base
The coloured view shows the first 2,000 tokens; the counts cover the whole text.
Tokens by model family
| Model family | Tokens | Method |
|---|---|---|
| OpenAI o200k_baseGPT-5 family, GPT-4.1, GPT-4o, o1, o3, o4-mini | 75 | ExactSame vocabulary as the API. Source |
| OpenAI cl100k_baseGPT-4, GPT-3.5 Turbo, text-embedding-3 | 75 | ExactSame vocabulary as the API. Source |
| OpenAI GPT-6 familyGPT-6, GPT-6.1, GPT-6.2 | 75 | ReferenceTokenizer not published; o200k_base count shown for reference. Source |
| Anthropic, current tokenizerClaude Opus 4.7 and later, all Claude 5 models | 129 | EstimateAbout 2.5 characters per token (Anthropic models overview). Source |
| Anthropic, previous tokenizerClaude Sonnet 4.6, Haiku 4.5 and earlier | 92 | EstimateAbout 3.5 English characters per token (Anthropic glossary). Source |
| Google GeminiAll Gemini models | 81 | EstimateAbout 4 characters per token (Google AI docs). Source |
| DeepSeekDeepSeek Flash, DeepSeek V4 Pro | 97 | Estimate0.3 per English character, 0.6 per Chinese character (DeepSeek docs). Source |
Estimates use the ratio each provider publishes and are mostly based on English; for Chinese and code they can be far off. For an exact count use the provider's own token counting API.
Share of the context window
- GPT-6.2 Sol (o200k_base reference)75 of 1,050,000 tokens · <0.01%
- GPT-5 mini75 of 400,000 tokens · 0.02%
- GPT-4.175 of 1,047,576 tokens · <0.01%
- GPT-4o75 of 128,000 tokens · 0.06%
- GPT-475 of 8,192 tokens · 0.92%
- GPT-3.5 Turbo75 of 16,385 tokens · 0.46%
- Claude Sonnet 5.5 (estimate)129 of 1,000,000 tokens · 0.01%
- Claude Haiku 4.5 (estimate)92 of 200,000 tokens · 0.05%
- Gemini 3.5 Flash-Lite (estimate)81 of 1,048,576 tokens · <0.01%
- DeepSeek Flash (estimate)97 of 1,000,000 tokens · <0.01%
Context windows from each provider's model page, checked 2026-11-18. Estimated rows are marked.
Version v1.0Updated Update history
What the numbers mean
Models read and bill text in tokens: pieces of words, whole common words, single characters or bytes.
Tokens
The number the API bills and the context window is measured in. Input tokens (your prompt, system message, documents) and output tokens (the answer) are usually priced differently.
Characters per token
English prose with o200k_base is usually around 4 to 5 characters per token. Chinese is closer to 1 to 2, which is why the same message can cost more in Chinese.
Exact, reference, estimate
Exact rows use the vocabulary the API uses. The GPT-6 row is a reference count, because OpenAI has not published that tokenizer. Estimates apply a provider's published ratio and can be off by a wide margin.
Context window
The bar shows how much of each model's window this text alone would fill. Leave room for the system prompt, chat history and the answer.
API calls in chat format add a few tokens per message for roles and separators, and images, audio and tool definitions are counted separately. The provider's usage field on each response is the final figure.
Count tokens in three steps
No sign-up; the counter works on a phone too.
-
1
Paste your text
A prompt, a system message, a knowledge-base article or the answer you expect. Or try the English, Chinese or code sample.
-
2
Read the totals
Tokens for the selected OpenAI vocabulary, plus characters, words and characters per token.
-
3
Compare models
The table lists exact counts for OpenAI and labelled estimates for Claude, Gemini and DeepSeek; the bars show how full each context window is.
How the text is split into tokens
OpenAI models use byte-pair encoding (BPE): a fixed vocabulary of byte sequences learned from training text.
- The text is first cut into pieces with a regular expression: words with their leading space, numbers in groups of up to three digits, punctuation, line breaks
- Each piece is turned into UTF-8 bytes and the most frequent byte pairs in the vocabulary are merged step by step
- A common word becomes one token; a rare word, name or Chinese character can become several
- o200k_base has about 200,000 entries and splits Chinese and other non-English text into fewer tokens than the older cl100k_base (about 100,000)
- Estimates for other providers: characters × the provider's published ratio, rounded
| Row | Method | Published by |
|---|---|---|
| o200k_base, cl100k_base | Exact BPE with the vocabulary files from OpenAI tiktoken | OpenAI |
| GPT-6 family | o200k_base count as a reference | OpenAI has not listed GPT-6 in tiktoken |
| Claude (current) | Characters ÷ 2.5 | Anthropic models overview |
| Claude (previous) | Characters ÷ 3.5 | Anthropic glossary |
| Gemini | Characters ÷ 4 | Google AI docs |
| DeepSeek | Chinese × 0.6 + other characters × 0.3 | DeepSeek API docs |
The same sentence in English and Chinese
One support message, written once in each language, counted with both OpenAI vocabularies.
| English | Chinese | |
|---|---|---|
| Text | Our support team is online Monday to Friday. In the evenings and at weekends, AI answers first from the knowledge base. | 我们的客服团队周一到周五在线,晚上和周末由 AI 根据知识库先回答。 |
| Characters | 119 | 34 |
| o200k_base tokens | 24 | 22 |
| cl100k_base tokens | 24 | 35 |
The Chinese version has far fewer characters but a similar number of tokens with o200k_base, and noticeably more with cl100k_base. Paste either sentence into the counter to see the same numbers.
Where token counts go wrong
Most budget surprises come from counting the wrong text, not from the tokenizer.
Using words × 1.3 for every language
The rule of thumb only fits English. Chinese, Japanese, code and URLs use very different numbers of tokens per character.
Counting only the question
Each call also sends the system prompt, the chat history and any retrieved documents. That is usually most of the input.
Treating one tokenizer as universal
Claude, Gemini, DeepSeek and Qwen each use their own vocabulary. An OpenAI count is only a rough guide for them.
Filling the whole context window
The window holds input and output together. A prompt that fills it leaves no room for the answer.
AI replies in live chat, without counting tokens
TapCub live chat can answer visitors with AI from your knowledge base. Plans count AI replies, not tokens.
Counted per reply
One automated answer counts once in any language: 30 a month on Free, 300 on Pro, 2,000 on Max and 10,000 on Ultra.
Learn moreBring your own key
From Pro, set an OpenAI-compatible base URL and model. Replies then run on your account and stop counting against the quota.
Learn moreAnswers from your articles
The AI writes from the knowledge base you publish, names the article it used, and hands off to a person when no article covers the question.
Learn moreToken counter questions
Still have a question?
Chat with the team behind TapCub — we usually reply within a few hours on business days.
How do I count tokens for GPT-5 or GPT-4o?
Paste the text and keep o200k_base selected. GPT-5 models, GPT-4.1, GPT-4o and the o-series all use that vocabulary according to OpenAI's tiktoken library, so the number matches what the API counts for that text.
Is the count the same as on my API bill?
For the text itself, yes. The bill also includes a few tokens per message for the chat format, the system prompt, tool definitions, images and the output, including reasoning tokens. The usage field in each API response is the final number.
Why are Claude and Gemini only estimates?
Anthropic and Google do not publish a tokenizer that runs in the browser. The estimate uses the ratio they publish (about 2.5 characters per token for current Claude models, about 4 for Gemini). For exact numbers use their token counting endpoints.
How many tokens is 1,000 words?
For English prose with o200k_base, roughly 1,200 to 1,400 (our own help pages come out at about 1,250). Google puts 100 tokens at about 60 to 80 English words for Gemini. Paste a page of your own text to get a figure for your writing.
Why does Chinese text use more tokens per character?
Vocabularies are learned mostly from English, so one English token often covers a whole word while a Chinese character takes one token or more. o200k_base handles Chinese much better than cl100k_base: the same Chinese sentence above uses 22 tokens instead of 35.
Does my text get sent anywhere?
No. Counting happens in your browser. The page only downloads the vocabulary file from tapcub.com; nothing you type goes to TapCub or to any AI provider.
What about GPT-6 models?
OpenAI's tiktoken library does not list GPT-6 yet, so the tool shows the o200k_base count as a reference and labels it that way. Check the usage field in API responses for the real number.
Update history
New features, fixes and data refreshes for this tool, newest first.
-
· v1.0
LaunchedFirst release.
Data this tool relies on
- LLM API list prices, tokenizer ratios and context windows — checked 2026-11-18, reviewed every 1 months (next review by 2026-12-18)
Missing something or found an error? Tell us — requests that come up often go into the next update. All tool updates
Let AI answer routine chat questions
TapCub live chat answers from your knowledge base, cites the article and hands off to a person when unsure. AI replies are included in every plan.