Token counter and estimator

Free tool Runs in your browserNothing uploaded
In short

A token is roughly four characters of ordinary English, or about 0.75 words. This tool estimates the token count of any text and what sending it would cost. It is an estimate, not an exact tokenizer run — every model family splits text slightly differently, and the tool shows a range rather than pretending otherwise.

Language models do not read characters or words; they read tokens, which are fragments produced by a tokenizer specific to each model family. That is why the same paragraph counts differently on different providers, and why an exact number requires running that provider's own tokenizer.

This is an estimator and says so. It applies well-established ratios — around four characters per token for ordinary English prose, more tokens per word for code, markup, names and non-English text — and shows a range. For billing decisions, treat it as a planning figure; for the exact count, use your provider's tokenizer.

0tokens (estimate)
0–0likely range
0words
0characters

An estimate, not a tokenizer run — every model family splits text differently. Nothing you paste leaves your browser.

Why the number changes per model

Tokenizers are trained alongside the model on a particular corpus. A vocabulary trained mostly on English splits Turkish, Japanese or Arabic into far more pieces — two to three times as many tokens for the same meaning is common. Code sits between the two: frequent keywords compress well, long identifiers do not.

This matters commercially. A product serving a non-English market pays noticeably more per sentence than the same product in English, and no amount of prompt tuning changes that.

Using this to size a context window

The other everyday use of a token count is fitting things into a context window. Take the estimate, add your system prompt, add whatever retrieval will inject, and leave room for the answer — the output shares the same budget on most models.

If the total is uncomfortably close to the limit, the fix is almost always better retrieval rather than a bigger window: three relevant paragraphs beat forty pages, and they cost a fraction as much. That is the argument for a proper vector store over pasting documents in whole.

Questions

Questions

How accurate is this estimate?
For ordinary English prose it is typically within a few per cent. For code, tables, unusual names or non-English text the real count can be meaningfully higher, which is why a range is shown rather than a single confident number.
Is my text sent anywhere?
No. The calculation runs entirely in your browser — nothing is uploaded, logged or stored. View the page source if you would like to confirm that.
How do I get an exact count?
Run your provider’s own tokenizer — OpenAI publishes tiktoken, and most providers document theirs. Exact counts require the model’s actual vocabulary.
Do output tokens count too?
Yes, and they are usually priced higher than input. Estimate the length of a typical answer and include it; the cost calculator handles both sides.

Put your AI stack on your own box

Pick an app, pick a size, and have it running today. Month to month, cancel whenever.