TokenPad
Counting

LLM Token Counter

Paste text, get the real token count and what it costs to send.

Your text
TokensExact
0tokens
Characters0
Words0
Chars / token
Cost as input$0.00

Same text, every model

ModelCountTokensAs inputInput $/1M
GPT-5.6 SolOpenAIExact$5.00
GPT-5.6 TerraOpenAIExact$2.00
GPT-5.6 LunaOpenAIExact$0.2000
GPT-5.5OpenAIExact$5.00
GPT-5.4OpenAIExact$2.50
GPT-5.4 miniOpenAIExact$0.7500
GPT-5.4 nanoOpenAIExact$0.2000
GPT-5.1OpenAIExact$1.25
GPT-5OpenAIExact$1.25
GPT-5 miniOpenAIExact$0.2500
GPT-5 nanoOpenAIExact$0.0500
GPT-4.1OpenAIExact$2.00
GPT-4.1 miniOpenAIExact$0.4000
GPT-4oOpenAIExact$2.50
GPT-4o miniOpenAIExact$0.1500
o3OpenAIExact$2.00
o4-miniOpenAIExact$1.10
GPT-3.5 TurboOpenAIExact$0.5000
Claude Fable 5AnthropicEstimate$10.00
Claude Opus 5AnthropicEstimate$5.00
Claude Opus 4.8AnthropicEstimate$5.00
Claude Opus 4.6AnthropicEstimate$5.00
Claude Sonnet 5AnthropicEstimate$2.00
Claude Sonnet 4.6AnthropicEstimate$3.00
Claude Sonnet 4.5AnthropicEstimate$3.00
Claude Haiku 4.5AnthropicEstimate$1.00
Gemini 3.6 FlashGoogleEstimate$1.50
Gemini 3.5 FlashGoogleEstimate$1.50
Gemini 3.5 Flash-LiteGoogleEstimate$0.3000
Gemini 2.5 FlashGoogleEstimate$0.3000
Gemini 2.5 Flash-LiteGoogleEstimate$0.1000
DeepSeek V4 FlashDeepSeekEstimate$0.1400
DeepSeek V4 ProDeepSeekEstimate$0.4350
Grok 4.5xAIEstimate$2.00
Grok 4.3xAIEstimate$1.25
Grok Build 0.1xAIEstimate$1.00
Mistral Medium 3.5Mistral AIEstimate$1.50
Mistral Large 3Mistral AIEstimate$0.5000
Mistral Small 4Mistral AIEstimate$0.1500
Magistral MediumMistral AIEstimate$2.00
Devstral 2Mistral AIEstimate$0.4000
Ministral 3 8BMistral AIEstimate$0.1500

What this tool tells you

A language model never sees your text. It sees tokens: fragments produced by a byte-pair encoder that was trained on a corpus and then frozen. Billing, rate limits and the context window are all measured in those fragments, so the token count is the only unit that matters commercially. This page gives you that number for a block of text, and the price of sending it to each model we track.

Almost every token counter on the web divides your character count by four. That shortcut is roughly right for English prose and badly wrong for everything else — which is unfortunate, because the payloads that dominate real API bills are JSON, source code, transcripts and non-English text, and all four break the assumption. Here the text is run through the actual encoding, in your browser, with nothing sent anywhere.

Exact counts and honest estimates

Every model on this page carries one of two badges, and the distinction is not cosmetic.

  • Exact — OpenAI publishes its tokenizers. The page loads the same o200k_base or cl100k_base encoding the API uses and runs it over your text. The number is the number.
  • Estimate — Anthropic, Google and DeepSeek do not ship a tokenizer that runs in a browser. Anthropic offers only a server-side endpoint; Gemini’s SentencePiece vocabulary has no browser build. For those models the text is encoded with o200k_base and scaled by a documented factor, and the page says so on the model, in the table, and in the note beneath the readout.

Sites that present a scaled tiktoken count for Claude as though it were a real Claude count are not being more accurate than this one. They are being less transparent about the same limitation. The full derivation of every factor is on the methodology page.

How to read the result

The headline figure is your text alone. Your actual request will be larger, often much larger, because the context window is a single budget shared by everything in the call: the system prompt, every earlier turn in the conversation, tool and function definitions, any attached documents, and the model’s own reply. A 300 token user message inside an agent loop can easily sit in a 40,000 token request.

The characters per token figure is the one worth watching over time. English prose lands near 4.0. If your production prompts sit at 2.5, you are paying a structural tax — usually indentation, repeated JSON keys, or base64 — and that is a fixable cost rather than a fact of life. Drop a real payload into the tokenizer playground to see precisely which characters are eating the budget.

Mistakes that cost money

Budgeting from a character estimate

Characters ÷ 4 understates a minified JSON payload by 30–50%. Teams that size a contract on that basis discover the gap in the second month, at scale.

Forgetting that output is priced separately, and higher

Output typically costs four to six times input, because it is generated one token at a time rather than processed in a single parallel pass. A concise model at a higher headline price is often cheaper in production than a cheap model that rambles. Model both sides in the cost calculator before you decide.

Assuming the count transfers between models

It does not. Different providers train different vocabularies, and even one provider changes them between generations — Anthropic has stated that the tokenizer introduced with Claude 4.7 yields roughly 30% more tokens for the same text than the one before it. Re-measure whenever you switch models, and re-check your assumptions before you migrate a workload.

Ignoring the language mix

The vocabularies are English-heavy. The same paragraph in a non-Latin script can cost two to four times more tokens. For a product serving several markets, token cost per user is not uniform across them, and pricing built on an English average will be wrong where it matters.

Where your text goes

Nowhere. This site is a set of static files with no server to receive anything. The tokenizer is a JavaScript module that runs on your device; you can put the page in a browser tab, disconnect from the network, and it keeps counting. That matters if the text you are measuring is a customer record or an unreleased prompt, which — for anyone doing this work seriously — it usually is.

Frequently asked questions

Is the token count exact?
For OpenAI models, yes. The page runs the same o200k_base and cl100k_base byte-pair encodings the API uses, so the number matches what you will be billed for the text itself. For Anthropic, Google and DeepSeek models the count is marked as an estimate, because none of them publish a tokenizer that can run in a browser. Every model on the page carries a badge telling you which of the two it is.
Why do different models give different counts for the same text?
A tokenizer is a learned vocabulary, not a rule. Each provider trains its own, so the same sentence splits differently. Anthropic has stated that the tokenizer introduced with Claude 4.7 produces roughly 30% more tokens than its predecessor for the same input, which is why a newer model can cost more per page of text even at the same headline price.
Does my text get uploaded anywhere?
No. The tokenizer is a JavaScript module that runs on your machine. There is no server to send it to — this site is a set of static files. You can disconnect from the network after the page loads and it keeps working.
Why is the count different from my API bill?
Your bill covers the whole request, not just your text: the system prompt, prior turns in the conversation, tool definitions, and the model output all consume tokens. This tool counts one block of text. Use the cost calculator if you need to model a full request.
How many tokens is a word?
For ordinary English prose, roughly 0.75 words per token, so 1,000 tokens lands near 750 words. That ratio collapses for code, JSON, URLs, non-Latin scripts and rare proper nouns, which can run two or three times denser. This is exactly why estimating by character count misleads you on the inputs that matter most.

More counting tools