Count AI Tokens Without Sending Text Anywhere
Instant token estimates for your text or documents - plus an exact count using the model family’s real tokenizer.
Why token counts matter
Every LLM measures text in tokens, and every model has a context window - the maximum number of tokens it can consider at once. If your document plus your question plus the model’s answer do not fit, the model silently loses the beginning of the conversation or refuses the input. Knowing the token count before you start saves you from truncated answers, and for API users it is what the bill is based on.
Most online token counters send your text to a server to count it - which is ironic, given that people often check tokens precisely for confidential documents. The ASD123.ai Context Estimator counts in your browser instead.
Two counting modes
- Instant estimate - a model-family-aware heuristic (GPT-style, Llama, Qwen, Gemma) that accounts for words, punctuation, and non-Latin scripts. It responds as you type, with no downloads at all.
- Exact count - one click downloads the model family’s real tokenizer (a few megabytes, cached afterwards) and tokenizes your text locally. The number you see is mathematically exact for that tokenizer.
You can paste text or drop TXT, DOCX, and PDF files - extraction also happens in the browser. A reserve setting keeps room for the model’s answer and reasoning, and the tool recommends the smallest context window (4K to 128K+) that comfortably fits.
Frequently asked questions
How accurate is the instant estimate?
Typically within a few percent of the real count for natural language, because the heuristic is tuned per model family and handles non-Latin scripts separately. When it matters, use the exact mode - it runs the model family’s actual tokenizer.
Which model families are supported?
GPT-style models (o200k tokenizer), Llama, Qwen, and Gemma profiles - covering the most common cloud and local models. Counts differ between families because each uses its own vocabulary.
Why do different models report different token counts?
Tokenizers split text differently: a word that is one token in GPT’s vocabulary may be two or three tokens for Llama. That is why the estimator lets you pick the model family first.
Does it work offline?
The instant estimate works fully offline once the page is loaded. The exact mode needs a one-time tokenizer download; after that it is cached by your browser.
Check your document before you paste it
Instant estimates, exact counts on demand, and no text ever leaves your browser.
Related: Convert PDF to Markdown · Run AI chat locally