● Runs locally in your browser

AI Token Counter

Estimate tokens in prompts, documents, and code without uploading your text. Then translate the estimate into rough API input cost.

Paste your prompt, document, or code
0estimated tokens
0words / segments
0characters
0UTF-8 bytes
Private: client-side only.Free: no account or API key.Pricing data verified —
Cost signal

Estimated input cost by model

Use this as a quick planning estimate. Actual billed tokens depend on the provider tokenizer, caching, tools, and request structure.

ModelPublished input rateEstimated input cost
Method

Why the number is labeled “estimated.”

Different model families tokenize the same text differently. This version intentionally uses a lightweight heuristic so it can stay static, fast, and private.

Use it for budgeting and context planning, not as a substitute for provider-side usage accounting.

English and codeRoughly weighted from character density, punctuation, and whitespace.
CJK textChinese, Japanese, and Korean characters are weighted differently from Latin text.
Next stepNeed budget planning? Open the API Cost Calculator.
What a token isThe unit behind every estimate — ~4 characters, 0.75 words: What Is an AI Token?
Sending scraped HTML?Measure what cleaning it saves: HTML Token Savings.
1M tokens in words750,000 words, 1,500 pages — and why only 5 of 8 models accept it in one request: How Many Words Is 1M Tokens?
Trim the promptFind repeated instructions, markup and filler: Prompt Weight Analyzer
Stop paying twiceChat re-sends its history every turn — 96.6% of input tokens on a 20-turn conversation: Conversation Cost Growth Calculator.
The full cost playbookSeven levers ranked by return, from re-sent history to a 22.7x model spread: How to Reduce LLM API Costs.
Input vs outputWhy the reply costs 5.0x–8.3x more per token than the prompt, and the break-even ratio: Input vs Output Tokens.
A 200-page PDF133,333 tokens, and the one model where it nearly does not fit: Can a 200-Page PDF Fit in an LLM?.
How pricing worksPer-1M rates, two counters and the formula behind every number on this site: How LLM Token Pricing Works.
Flat plan vs meteredWhere a monthly subscription stops being cheaper — break-even requests per day on all 8 models: API vs Subscription Break-even.
Retrieval-shaped costsChunk size, top-k and overlap priced per query, and what one more retrieved chunk costs: RAG Context Cost Calculator.
Agent loopsWhy an 8-step agent sends 66,400 input tokens, 75.9% of it re-read history: Agent Loop Cost Calculator.
Price directionIs token pricing going up or down? The eight-model basket index reads 87.1 against its 2026-08-09 baseline — down 12.9%, with both cuts scheduled to lapse: LLM Pricing Index.
A fourth providerDeepSeek prices input three ways — a cache-hit rate, a cache-miss rate and a peak/off-peak clock — at $0.30/$1.20 per 1M tokens on flash at peak, exactly half off-peak, with a 384,000-token output cap: DeepSeek API Pricing.
FAQ

AI token counter questions

Is this token count exact?

No. It is a cross-model estimate because tokenizer behavior differs by model family.

Does the text leave my browser?

No. This page has no prompt submission endpoint; the calculation happens locally.

Can I use this for API budgeting?

Yes for rough planning. For billing reconciliation, use the token usage returned by your API provider.