LLM Token Counter (Estimate)
Estimate how many tokens a prompt uses and what share of an 8K, 32K, 128K, 200K or 1M context window it fills. A fast heuristic estimate that runs in your browser. Everything runs locally in your browser; nothing is uploaded.
Paste a prompt or document. The estimate blends characters divided by four and words times 1.33, plus a small adjustment for symbols common in code. Real counts differ by model, so keep a margin.
Prompt or text
Estimate
Output appears here.Learn more
What a token is
Models read text as tokens: whole words, word pieces or single characters. English averages about four characters per token, while code and non-Latin scripts use more tokens per character.
Planning around the limit
Leave room for the model's reply. A prompt that fills 90 percent of the context window leaves little space for output, and quality tends to drop on very long inputs.
Frequently asked questions
How accurate is the estimate?
Within roughly 10 to 20 percent for English prose. Code, other languages and emoji vary more.
Why not the exact tokenizer?
Each model family has its own tokenizer and shipping them would add megabytes. For exact counts use the provider's token-counting API.
Is my text uploaded?
No. The estimate is computed in your browser.