I keep running into the same small problem while building AI tools: a prompt can look reasonable in a text editor, but I still want to know how much context it will actually consume before I send it to a model.
So I added a new tool to Tools Online: AI Token Calculator.
https://toolsonline.run/token-calculator
Why I built it
Token usage is often useful before an API request, not only after the API returns usage metadata. When I paste a document, a chat history, a code snippet, or a long product brief into a prompt, I want a quick answer: is this input still comfortably inside the context window, or should I split, summarize, or switch to a larger model?
The tool is intentionally simple. Paste text, choose a provider and model, then check token count and context usage in the browser.
What it supports now
The first version covers the model families I reach for most often:
- OpenAI / GPT models
- Claude
- Gemini
- Qwen
- GLM
- Kimi
One detail mattered to me: the UI separates exact counts from estimates. OpenAI models use a compatible local BPE tokenizer. Claude, Gemini, Qwen, GLM, and Kimi are marked as estimates because their tokenizers are proprietary, not always public, or best verified through vendor APIs.
That distinction is important. A token calculator should not pretend that every provider can be measured with the same level of precision. Exact when possible, estimated when honest.
Local-first by default
Prompts often include private notes, customer text, logs, code, internal docs, or product ideas that are not public yet. I did not want this workflow to depend on uploading text to a server.
The calculator runs in the browser, does not require an account, and does not need an API key. It is meant as a planning tool before the final model call, not as a replacement for provider-side billing usage.
Where AI helped
AI helped me tighten the scope: which models should be in the first release, where to label results as estimates, how to explain tokenizer differences in FAQ copy, and how to make the page useful for people searching for GPT, Claude, Gemini, Qwen, GLM, or Kimi token planning.
The final version stayed intentionally direct: paste text, choose model, inspect tokens, and decide whether your prompt still fits.
Try it here: https://toolsonline.run/token-calculator
0
0
0