Menu
PDF Tools
Image Tools
Converters & Utilities
Seller & Print Tools
Accounting & Business
Calculators
Text & Writing Tools
Developer & Web Tools
Creator & Social Tools
Browser Utilities & Games
Document & Design Makers
Text & Developer Tools
Exam & Form Tools

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.

How to use LLM Token Counter online

  1. Paste your text. Or open a file.
  2. Choose a tokenizer. Newer or older.
  3. Read the counts. Tokens, characters, words.
  4. 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?
Only if your provider uses the same tokenizer and counts the same extra tokens. Check the usage numbers in your provider's own answers.
Why do other languages use more tokens?
Tokenizers are trained mostly on English, so text in other scripts is often cut into more pieces.
Does it count the tokens of the chat format?
No. It counts the text only, without the extra tokens a chat format adds around each message.
Which tokenizer should I choose?
Choose the one that matches your model family, or the newer one if you are unsure.
Does it send my text to an AI company?
No. The tokenizer runs in your browser.
Does the LLM Token Counter keep a copy of my text?
No. The LLM Token Counter works in your browser, and nothing is uploaded.
Can I chain the LLM Token Counter with another tool?
Copy the LLM Token Counter result, or save it as a text file from the result box.

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.

More tools in Text & Writing Tools →

Search tools