Free Token Counter for LLMs
Exact model-tokenizer counts where public; bounded estimates for proprietary tokenizers.
How to use Token Counter
Paste your text or prompt.
See model-tokenizer counts and bounded provider estimates.
Use exact counts where available and ranges for proprietary tokenizers.
How it works
GPT-4o is counted with js-tiktoken encodingForModel. Llama is counted with its published tokenizer loaded through Transformers.js. Claude and Gemini production tokenizers are proprietary, so this tool reports bounded estimates based on byte and word density instead of fabricated exact values.
Why use it
- GPT-4o model encoding
- Published Llama tokenizer
- Bounded Claude and Gemini estimates
- Real-time counting as you type
- Word and character counts
Questions
What is a token in LLMs?
A token is a chunk of text a model reads, usually a word part. In English, 1 token is about 4 characters on average.
Is this token counter free?
Yes. It is free with no signup or limits.
Which counts are exact?
GPT-4o uses js-tiktoken encodingForModel. Llama uses its published tokenizer through Transformers.js. Claude and Gemini ranges are estimates because their production tokenizers are not distributed as browser libraries.
Is my text uploaded anywhere?
No. Counting happens locally in your browser.
Does it work offline?
Yes. After the tokenizer loads once, it works without internet.