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