Polarison

AI token counter

Paste any text to count its tokens and see what it would cost to send to every model we track. Free, instant and private — it runs in your browser.

Tokens
0
Characters
0
Words
0
Characters per token

Counted with OpenAI’s open-source o200k_base tokenizer, entirely in your browser — your text is never uploaded.

What sending this text would cost

Your text as input, plus the reply length you expect, at each model’s standard API price.

ModelInput costPer request1,000 requestsContext used
GPT-5.6 LunaOpenAI$0$0.0006$0.600.00%
DeepSeek V4.1 FlashDeepSeek$0$0.0006$0.600.00%
Gemini 3.5 Flash-LiteGoogle$0$0.0013$1.250.00%
Gemini 2.5 FlashGoogle$0$0.0013$1.250.00%
Grok 4.3xAI$0$0.0013$1.250.00%
Gemini 3.8 FlashGoogle$0$0.0019$1.880.00%
DeepSeek V4 ProDeepSeek$0$0.0020$1.980.00%
Claude Haiku 4.5Anthropic$0$0.0025$2.500.00%
Grok 4.6xAI$0$0.0030$3.000.00%
Gemini 3.5 FlashGoogle$0$0.0045$4.500.00%
Claude Sonnet 5Anthropic$0$0.0050$5.000.00%
Gemini 2.5 ProGoogle$0$0.0050$5.000.00%
GPT-5.6 TerraOpenAI$0$0.0060$6.000.00%
Gemini 3.1 ProGoogle$0$0.0060$6.000.00%
GPT-5.6 SolOpenAI$0$0.01$10.000.00%
Claude Opus 5Anthropic$0$0.01$12.500.00%
GPT-6 AstraOpenAI$0$0.03$25.000.00%
Claude Fable 5.1Anthropic$0$0.03$25.000.00%

Token counts use o200k_base for every row; Anthropic, Google, xAI and DeepSeek use their own tokenizers, so their real counts — and costs — can differ. Excludes caching, batch discounts and long-context surcharges.

How many tokens is a word?

It depends on the language and the kind of text. We ran the same short paragraph, in three languages, plus a small code snippet through the o200k_base tokenizer:

SampleCharactersWordsTokensTokens per 100 words
English prose3045462115
Portuguese prose3345572131
Spanish prose3726476119
TypeScript code2313272225

In English, 1,000 words came to about 1,148 tokens. The Portuguese version needed 16% more tokens, and code packs symbols and punctuation that each cost tokens. Always count real samples of your own content before budgeting.

Why models count tokens differently

Every provider trains its own tokenizer, so the same text can be a different number of tokens on different models. This counter uses o200k_base, the open-source encoding used by OpenAI’s GPT-5, GPT-4.1 and GPT-4o models. Anthropic notes that its tokenizer for Claude Opus 4.7 and later produces roughly 30% more tokens than the one used by earlier Claude models. That is why identical per-token prices can still lead to different bills.

Get exact counts from each provider

How to spend fewer tokens

  • Trim repeated context. System prompts and chat history are re-sent on every request; shorter instructions save tokens on every call.
  • Use prompt caching. Cached input usually costs about 10% of the normal input price — see each model’s cached rate on the model pages.
  • Cap the output. Output tokens cost several times more than input, so ask for concise answers and set a maximum output length.
  • Match the model to the job. Compare prices and benchmark scores on the benchmarks page, then estimate a full month in the cost calculator.

Frequently asked questions

How do I count the tokens in my text?
Paste it into the counter above. It uses OpenAI’s open-source o200k_base tokenizer and runs entirely in your browser, so the count updates as you type and your text is never uploaded.
How many tokens is 1,000 words?
In our English sample, 1,000 words works out to about 1,148 tokens with o200k_base. Other languages, code and other providers’ tokenizers can produce more.
Is this token count accurate for Claude and Gemini?
Treat it as an estimate. Anthropic and Google use their own tokenizers; Anthropic says the tokenizer used by Claude Opus 4.7 and later models produces roughly 30% more tokens than its previous one. For exact numbers, use Anthropic’s token counting API or the Gemini API’s countTokens method.
Do other languages use more tokens than English?
Usually, yes. With o200k_base, our Portuguese sample used 16% more tokens and our Spanish sample 23% more than the same paragraph in English.
Is my text stored or sent anywhere?
No. Tokenization happens in your browser with JavaScript. Nothing you paste is sent to our servers or to any AI provider.