Skip to content
Run here 100% in your browser, no upload, no login

Token Counter

Estimate LLM token counts with characters, words and CJK statistics, all offline.

Approximate estimate, not an official tokenizer: non-CJK ≈ 4 characters per token, CJK ≈ 1.5 characters per token. Exact counts vary by model.

How to use it

  1. Paste the text you plan to send to a model into the input box.
  2. Four stat boxes update as you type: estimated tokens, characters, words and CJK characters.
  3. Read the note under the stats for the exact estimation rule in use.
  4. Click Try sample to see a mixed English and Chinese example.
  5. Use Clear to reset everything.

Common use cases

Why it stays private

The counting and estimation run entirely in this page with plain JavaScript. Your text never leaves the browser - nothing is uploaded, logged or stored, so drafting unannounced products or sensitive material is safe here.

FAQ

Q: How accurate is the estimate? A: Treat it as an order-of-magnitude guide. Real tokenizers use learned subword vocabularies, so actual counts vary by model and vocabulary - often within roughly 10 to 25 percent of this rule of thumb for typical prose.

Q: How are words counted? A: Latin and digit runs separated by spaces or punctuation each count as one word, and each CJK character counts as one word - the convention most text editors use for mixed-language text.

Q: Why not just use an official tokenizer? A: Official tokenizers are per-model libraries that must be downloaded and updated. This page trades exact counts for zero setup and zero network use, which is enough for budgeting decisions.

Your data stays on this device

Token Counter runs 100% locally. Everything you paste or drop is processed by your own browser and never transmitted. Nothing is stored on our servers — close the tab and it is gone.

Nothing you type is sent to a server, logged, or used for analytics. The page works even with your network disconnected after first load.