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 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.

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.