LLM Token Counter
Paste a text and see how many tokens it uses under an OpenAI-style tokenizer. The count is exact for the tokenizer you choose and only an estimate for other model families.
- Free, no sign-up
- Nothing is sent to a server
- Worldwide
How to use LLM Token Counter online
- Paste your text. Or open a file.
- Choose a tokenizer. Newer or older.
- Read the counts. Tokens, characters, words.
- Compare with the estimate. Characters divided by four.
Why use this free LLM Token Counter
- Two built-in tokenizers
- Exact counts
- Characters and words
- Characters-per-token ratio
- Rule-of-thumb estimate
- No upload
What a token is
Language models do not read letters or words. They read tokens, which are pieces of text. A common short word is often one token, while a long or rare word is cut into several. Prices and limits of most models are counted in tokens, so knowing the count helps you plan a prompt.
Which tokenizers are built in
The page includes two tokenizers from the open gpt-tokenizer package, o200k_base and cl100k_base. They match the encodings used by OpenAI models, the newer one and the older one. The code is loaded only when you count something, and the counting happens in your browser.
Exact and estimated
For the two built-in tokenizers the count is exact. Other model families use their own tokenizers, so the same text can give a different count there, sometimes by a lot for code or for languages other than English. For those models, use the number here only as a guide and keep a safety margin.
The rule of thumb
The page also shows the common rough rule of one token for every four characters of English text. It is a quick guide and not a measurement. Compare it with the exact count to see how far off it is for your own text.
Privacy and limits
The text is counted in your browser and is not uploaded. Very long texts can be slow, so the page accepts up to one million characters. Special tokens written as plain text are counted as ordinary text. For budgets and costs, see the context window and API cost tools.
Using the tool
Change the text or any option of the LLM Token Counter and the answer moves straight away. Undo and redo step back through your earlier text.
LLM Token Counter: frequently asked questions
Is the count the same as the one my provider bills?
Why do other languages use more tokens?
Does it count the tokens of the chat format?
Which tokenizer should I choose?
Does it send my text to an AI company?
Does the LLM Token Counter keep a copy of my text?
Can I chain the LLM Token Counter with another tool?
Related searches for LLM Token Counter
- LLM Token Counter online
- free LLM Token Counter
- LLM Token Counter online free
- LLM Token Counter for mobile
- LLM Token Counter without sign up
- LLM Token Counter – Text & Writing Tools
LLM Token Counter is a free online tool on MAITBOX, in the Text & Writing Tools group. It runs in your browser, so what you type is not sent to a server. It works on Android and iPhone, and on Windows, Mac and Linux, with no download and no account.