Skip to content

Free tool

Token Counter

Paste any text to see exactly how many tokens it is for GPT, Claude, and Gemini — plus words, characters, how much of each model's context window it fills, and the cost to send it. The real GPT tokenizer runs in your browser, so nothing is uploaded.

Tokens

0

exact (GPT o200k)

Words

0

whitespace

Characters

0

— chars/token

Token count is exact for GPT (o200k). Claude & Gemini tokenize within ~10-15%, so this is a tight estimate for them too. Everything runs in your browser — nothing is uploaded.

Model · context fit

Input cost

GPT-5.50.0% of 1,050K
$0.00
Claude Opus 4.80.0% of 1,000K
$0.00
Claude Sonnet 4.60.0% of 1,000K
$0.00
Gemini 3.1 Pro0.0% of 1,000K
$0.00
Llama 4 Maverick0.0% of 1,000K
$0.00

Input cost = tokens × the model's per-token input price (approximate). Add your expected reply length for the full bill — see the AI Cost Calculator.

Frequently asked

How many tokens is my text?

Paste it above and you'll get the exact count. Tokens are the chunks an AI model reads — roughly 0.75 words or ~4 characters of typical English each, but the real number depends on the exact words, punctuation, code, and language. This tool runs the actual GPT tokenizer (o200k) in your browser, so the token count is exact for GPT models, not an estimate.

Is the token count the same for GPT, Claude, and Gemini?

Close, but not identical. Each model family has its own tokenizer. GPT (o200k) is shown exactly here; Claude and Google's Gemini tokenize the same English text within roughly 10-15% of that number, so the GPT count is a tight estimate for them too. For exact Claude or Gemini billing, use each provider's own counter, but for planning and cost estimates this is well within range.

Why does the token count matter?

Two reasons. First, models have a context window — a maximum number of tokens they can read at once — so a long document may not fit. Second, APIs bill per token, so token count is your cost. This tool shows both: how much of each 2026 model's context window your text uses, and the input cost to send it.

Is my text sent to a server?

No. The tokenizer runs entirely in your browser using JavaScript — your text never leaves your device and nothing is uploaded, logged, or stored. You can safely paste private prompts, documents, or code.

How do I reduce my token count?

Trim redundant context, remove boilerplate and repeated instructions, summarize long background instead of pasting it whole, and for repeated queries over a large corpus use retrieval (RAG) so you only send the relevant chunks. Tightening a prompt usually cuts both cost and latency without hurting quality.

How token counting works

A token is the unit a language model actually reads. Models do not see words or letters; they split text into tokens first, then process those. This tool runs the real GPT tokenizer (o200k) in your browser, so the count is exact for GPT and a close estimate for Claude and Gemini.

Tokens are not words

In typical English, one token is about 0.75 words or roughly four characters, so 1,000 tokens is around 750 words. The ratio shifts with the content: code, rare words, numbers, and non-English text break into more tokens per word than plain prose.

Why the count matters

APIs bill per token, so the count is your cost. Every model also has a context window, a hard limit on how many tokens it can read at once, so a long prompt may not fit. Knowing the count tells you both what you will pay and whether your text fits.

Cutting the count

Trim repeated instructions and boilerplate, summarize long background instead of pasting it whole, and for large corpora use retrieval so you send only the relevant chunks. Fewer tokens usually means lower cost and lower latency without hurting quality.

Related reading

Go deeper on how this works and what to pick.

Newsletter

Liked the tool? Get the signal.

One weekly email on the AI + hardware that actually matters — from the people who build these calculators.

Free · unsubscribe anytime · no spam.