7 tools
Token Counting Tools
Measure what you are about to send, before you send it.
Everything an LLM charges you for is denominated in tokens, and tokens are the one unit you cannot see in your editor. These tools make that unit visible.
The distinction that matters here, and that almost no other site makes, is between an exact count and an estimate. Where a provider publishes a tokenizer that runs in a browser, these tools run it and the number is the number. Where none exists, the figure is labelled an estimate and its derivation is written down.
- LLM Token CounterPaste text, get the real token count and what it costs to send.
- Context Window CalculatorFind out what fits, and what gets truncated.
- Tokenizer PlaygroundSee exactly where the model splits your text.
- Words to Tokens ConverterHow many tokens is 1,000 words? It depends, and here is by how much.
- Token HeatmapSee which lines of a prompt are eating the budget.
- LLM Cost by Language ComparatorThe same meaning costs two or three times more in some languages.
- Context Window Budget PlannerAllocate a context window before you fill it and find out it did not fit.
Which one you need
Start with the plain counter if the question is "how big is this". Paste the text, read the number, done — and if the model is an OpenAI one, that number is exact rather than estimated.
Move to the context window check when the question is "will this fit", because fitting is not the same as counting: the window is shared between your input and the answer, so a prompt that fits with no room to reply does not fit.
Use the per-line profiler when something got expensive and you do not know which part. It shows where the tokens actually are, which is routinely not where people assume — boilerplate headers, repeated examples and pretty-printed JSON are the usual culprits.
The words-to-tokens converter is for planning rather than measuring: sizing a feature before the text exists, or explaining to somebody why a 2,000-word document is not 2,000 tokens.
Questions
Why do different sites give different token counts?
Because most of them estimate. A characters-divided-by-four rule is accurate for English prose and wrong for code, JSON and every other language. Where a real tokenizer exists, these tools run it; where none exists, the figure is labelled an estimate rather than presented as a count.
Does counting tokens here send my text anywhere?
No. The tokenizer runs in your browser — the vocabulary file is downloaded once and the counting happens locally. There is no request to any server carrying your text, which is why these tools work with the network disconnected.
Guides that use these tools
- What is a token in an LLM? — The unit everything else is denominated in. Start here if tokens are still fuzzy.
- Context window vs token limit vs max tokens — Three terms, three different limits, one very common production bug.
- Why your JSON costs three times more tokens than you think — Half a JSON payload can be structure the model gains nothing from. Here is how to find it.
- Chunking strategies for RAG that actually retrieve — Chunk size, overlap and boundaries — and how to tell which one is breaking your retrieval.