token counter

LLM token counter

Paste text to count tokens — across OpenAI's o200k and cl100k tokenizers — and see what it costs to send as input to each model. Everything runs in your browser; your text never leaves the page.

tokens · o200k (GPT-4o/5)
tokens · cl100k (GPT-4)
characters
0
words
0

Loading tokenizer…

Cost to send this text

As input, per 1,000 sends. Exact for OpenAI; a close proxy for others (their tokenizers differ slightly).

Input cost to send the entered text, per model.
modelproviderinput /1Mcost / 1K sends
Gemini 2.5 Flash list Google $0.30
DeepSeek V4 Pro list DeepSeek $0.43
Mistral Large 3 list Mistral $0.50
GPT-5.4 mini list OpenAI $0.75
Claude Haiku 4.5 list Anthropic $1.00
Grok 4.3 list xAI $1.25
Gemini 3.1 Pro list Google $2.00
Claude Sonnet 4.6 list Anthropic $3.00
GPT-5.5 list OpenAI $5.00
Claude Opus 4.8 list Anthropic $5.00

Prices snapshot . Full monthly cost calculator →

Tokens are the unit that matters

Models don't see words — they see tokens, sub-word chunks of about four characters. That's why pricing, context windows, and rate limits are all quoted in tokens. A 1,000-word email is roughly 1,300 tokens; a block of minified JSON or a non-English script is far denser. Counting tokens before you build is the difference between an accurate cost estimate and a surprise bill.

Different models, different tokenizers

Each model family tokenizes differently, so the same text isn't the same number of tokens everywhere. This tool runs OpenAI's two real tokenizers — cl100k_base (GPT-4/3.5) and the newer, more efficient o200k_base (GPT-4o and later) — exactly, in your browser. Anthropic and Google use their own tokenizers that aren't published as browser libraries; their counts differ slightly, so treat the cost column as a close cross-model proxy and confirm exact Claude counts with the provider's count-tokens API.

From tokens to cost

Multiply tokens by the input price and you have the cost to send this text once; multiply by your request volume for the real figure. The table above shows the cost per thousand sends so small prompts stay legible. For output costs and full monthly workloads, use the cost calculator.

Frequently asked questions

What is a token?

A token is the unit a model reads and bills in — a sub-word chunk averaging about four characters of English. Common words are one token; rare words, code, and non-English text split into more. Billing, context limits, and rate limits are all measured in tokens, not words or characters.

Are these counts exact for every model?

The o200k and cl100k counts are exact — those are OpenAI's real tokenizers, run in your browser. Anthropic and Google use their own tokenizers that aren't published as client-side libraries, so their token counts differ slightly (usually within ~10%). For exact Claude counts, use Anthropic's count-tokens API. The cost column uses the o200k count as a close cross-model proxy.

Why do o200k and cl100k give different numbers?

They're different vocabularies. cl100k_base is the tokenizer for GPT-4 and GPT-3.5; o200k_base is the newer, larger vocabulary used by GPT-4o and later. The newer tokenizer is generally more efficient on code and non-English text, so the same text often costs fewer tokens under o200k.

Does this send my text anywhere?

No. Tokenization runs entirely in your browser — the tokenizer is downloaded on first use and your text never leaves the page.

Related