Token count estimator — no key, all models
Need to know how many tokens your text will cost or whether it fits a context window — without pasting an API key into a random tool? This estimator uses locally-bundled tokenizer heuristics for every major model family and runs fully offline in your browser. No key, no upload, no network call.
How it works
Exact token counts require each provider’s tokenizer, but for English prose the relationship between characters and tokens is remarkably stable. The tool applies per-family calibration:
- OpenAI (GPT / o-series) — ≈ 4 characters per token.
- Claude — very close to OpenAI, slightly different on punctuation.
- Gemini — a touch more tokens on the same text.
- Llama — its own SentencePiece vocabulary, typically a few percent higher.
It blends a characters-per-token estimate with a words-per-token check so a wall of symbols or a list of short words doesn’t skew the result, then reports a token count for each selected family next to raw character and word counts.
Tips for accurate budgeting
- Estimate in the same language you’ll use. Non-English and mixed scripts tokenize differently — re-check with representative text.
- Treat code separately. Source code and JSON tokenize less predictably than prose; add a margin.
- Add headroom for context limits. Leave room for the system prompt and the completion, not just the input you pasted.
- Confirm before billing. For an exact figure, use the provider’s own tokenizer; this tool is for fast, key-free planning.