Private token counter
Most online token counters send what you paste to a server. This one counts on your device, so internal documents, customer data and unreleased code stay with you.
Paste text to see how it fits.
| Model | Context used | Input cost |
|---|
Why a private counter
Teams often need a token count before deciding whether a document can go to an AI model at all. Pasting that document into a random website to find out defeats the purpose.
Here the count happens as you type, inside this page. Once the page is open it keeps working offline, which you can check by turning off Wi-Fi.
Estimates you can plan with
The count is an estimate, usually within about 10% of provider tokenizers for prose and code. That is close enough for budgeting and for checking context limits with a safety margin.
For a billing-exact figure, use the provider’s own token counting endpoint on text you are already allowed to send.
| Method | Text leaves your device | Exact for that provider |
|---|---|---|
| This page | No | No, estimate within ~10% |
| Typical online counter | Yes | Sometimes |
| Provider token-count API | Yes, to the provider | Yes |
| Local tokenizer library | No | Yes, for that tokenizer |
Other AI setups
- OpenAI API cost calculator5 models
- Claude API cost calculatorHaiku · Sonnet · Opus
- Gemini API cost calculatorFlash · Pro
- DeepSeek API cost calculatorOff-peak rates
- Prompt caching savings calculatorCached vs uncached
- AI agent cost calculator20 turns
- Context window calculator128K to 1M
- Private token counter
Related
Questions
Is anything I paste sent to a server?
No. The count runs in this page. There is no request carrying your text, and nothing is saved when you close the tab.
Can I count tokens in code?
Yes. Code symbols, indentation and line breaks are counted separately from words, which keeps code estimates close.
Does it work for Korean, Chinese and Japanese?
Yes. Those characters are counted at about one token each, which is close to how modern tokenizers handle them.
Why not use an exact tokenizer here?
Exact tokenizers ship vocabularies of a megabyte or more per provider. A small estimator keeps the page light and works for every model at once.