Pluvra

Token Counter

This token counter gives the exact number of tokens in your text for GPT-5, GPT-4.1 and GPT-4o (OpenAI's o200k_base encoding) and for GPT-4 (cl100k_base), counted in your browser. As a rough guide from OpenAI, 1 token is about 4 characters or 0.75 words of English text, so 100 English words come to roughly 133 tokens.

Paste a prompt, document or code. It is counted in your browser and never uploaded.

Tokens on GPT-5, GPT-4.1 and GPT-4o81Exact count with OpenAI's o200k_base encoding, also used by o1, o3 and o4-mini.
Tokens on GPT-4 and GPT-3.5 Turbo (cl100k_base)
83
Characters
373
Words
68
Tokens per word
1.19
Characters per token
4.6
Gemini, rough estimate at 4 characters per token
about 93
Input cost on GPT-5.5 at $5 per million tokens
$0.0004

These are OpenAI counts. Claude and Gemini use their own tokenizers, so their counts differ: get exact ones from Anthropic's free token counting endpoint or the Gemini API's countTokens. Tokens per word and per character use the o200k_base count. GPT-5.5 input price from OpenAI's pricing page, checked November 3, 2026.

What is a token?

A token is the unit of text a language model reads and writes. A common word is usually one token, together with the space in front of it. A rarer or longer word is split into pieces, and punctuation, numbers and code symbols often get tokens of their own. OpenAI, Anthropic and Google all bill API use by the token, so the count decides what a prompt costs and whether it fits in a model's context window.

Example: “Unbelievably, the tokenizer handled it.” has 5 words and 39 characters. GPT-5's o200k_base encoding turns it into 9 tokens: Un bel ievably , ␣the ␣tokenizer ␣handled ␣it . (␣ marks a space). Each common word is one token, while “Unbelievably” becomes three.

Encodings differ, too. “I can't believe it's already November!” is 7 tokens on GPT-5 but 9 on GPT-4, because GPT-4's older cl100k_base encoding splits “can't” and “it's” into two tokens each. Which encoding a model uses comes from OpenAI's tiktoken library: o200k_base for GPT-5, GPT-4.1, GPT-4o, o1, o3 and o4-mini, and cl100k_base for GPT-4 and GPT-3.5 Turbo.

How many tokens is a word?

For English, OpenAI's rule of thumb is that 1 token is about 4 characters or 0.75 words, which is about 1.33 tokens per word. Google gives a similar rule for Gemini: a token is about 4 characters, and 100 tokens are about 60 to 80 English words. The sample prompt in the counter above has 68 words and 373 characters and comes to 81 tokens on GPT-5, or 1.19 tokens per word and 4.6 characters per token.

Code, numbers, emoji and most languages other than English need more tokens for the same amount of meaning. The table shows the same sentence in four languages and a few other kinds of text, counted with both OpenAI encodings.

TextSampleGPT-5, GPT-4.1, GPT-4o tokensGPT-4, GPT-3.5 tokens
EnglishThe weather in Chicago will be cold and windy this weekend, so bring a warm coat.1818
SpanishEl tiempo en Chicago será frío y con viento este fin de semana, así que lleva un abrigo.2125
Chinese芝加哥这个周末天气寒冷多风,所以请带一件暖和的外套。2236
Hindiशिकागो में इस सप्ताहांत मौसम ठंडा और तेज़ हवा वाला रहेगा, इसलिए गर्म कोट साथ लाएं।2783
JavaScriptconst total = items.reduce((sum, item) => sum + item.price, 0);1919
JSON{"name": "Ana", "age": 31, "tags": ["admin", "beta"]}2221
NumbersOrder #48213 shipped on 2026-11-04 for $1,249.99.2121
EmojiGreat job 🎉🎉🔥👍🏽1017

The Hindi sentence takes 27 tokens on GPT-5 but 83 on GPT-4, so the newer encoding is much cheaper for some languages. For English text and code the two encodings give nearly the same count. To turn a token count into dollars on Claude, GPT or Gemini models, use the LLM API cost calculator.

How to count Claude and Gemini tokens

Claude and Gemini models use their own tokenizers, so the same text gives a different count on them than on GPT-5. An OpenAI tokenizer cannot tell you a Claude or Gemini count, which is why this counter labels its numbers with the OpenAI models they belong to.

For Claude, Anthropic offers a free token counting endpoint, POST /v1/messages/count_tokens, that takes the same input as a normal message (system prompt, tools, images, PDFs) and returns the input token count for the model you name. It needs an API key and has its own rate limit, starting at 5,000 requests per minute. Anthropic calls the result an estimate that can differ from the actual input by a small amount. It also notes that Claude Opus 4.7 and later models use a newer tokenizer that produces about 30% more tokens for the same text than earlier Claude models, so count against the model you plan to use.

For Gemini, Google's API has a countTokens method (count_tokens in Python) that returns the input token total before you send a request, and every response reports the tokens it used. The Gemini row in the counter is only a rough estimate based on Google's rule of about 4 characters per token.

Questions

How many tokens is 1,000 words?

About 1,333 tokens for English text, using OpenAI's rule of thumb of 0.75 words per token. Google's rule for Gemini (100 tokens is 60 to 80 English words) gives roughly 1,250 to 1,670 tokens; paste your text above for an exact GPT count.

Can I use this as a Claude token counter?

No. Claude uses its own tokenizer, so a GPT count is not a Claude count. For an exact number, send the text to Anthropic's free token counting endpoint (POST /v1/messages/count_tokens) with the Claude model you plan to use.

How do I count Gemini tokens?

Call countTokens (count_tokens in Python) in the Gemini API before you send the request, or read the token usage on the response. Google's rough rule is about 4 characters per token.

Does this match what OpenAI bills?

It is the exact o200k_base count of the text itself. A chat request adds a little formatting on top, which OpenAI's token counting cookbook puts at about 3 tokens per message, and function (tool) definitions add more.

What is the difference between o200k_base and cl100k_base?

They are two OpenAI encodings with vocabularies of about 200,000 and 100,000 tokens. o200k_base is used by GPT-5, GPT-4.1, GPT-4o and o-series models, cl100k_base by GPT-4 and GPT-3.5 Turbo; they give similar counts for English, but o200k_base needs far fewer tokens for many other languages.

Which OpenAI models does the main count cover?

GPT-5 (including GPT-5.1 through GPT-5.6), GPT-4.1, GPT-4o, o1, o3 and o4-mini, based on OpenAI's tiktoken model map and the gpt-tokenizer library. Neither lists GPT-6 models yet, so treat the count as an estimate for them.

Is my text uploaded anywhere?

No. The tokenizer runs in your browser, so the text you paste stays on your device.

Sources

Updated November 4, 2026. Estimates only, not tax or financial advice.