LLM Token Counter – Free Online Tool
Count tokens in a prompt and estimate what it will cost across GPT, Claude, and Gemini models.
236 characters · counted in your browser, never uploaded
| Model | Tokens | Context used | Input | Reply | Total |
|---|---|---|---|---|---|
| GPT-5.6 SolOpenAI | ~50estimate | <0.01% | $0.00020 | $0.0100 | $0.0102 |
| GPT-5.6 TerraOpenAI | ~50estimate | <0.01% | $0.00010 | $0.00600 | $0.00610 |
| GPT-5.6 LunaOpenAI | ~50estimate | <0.01% | $0.00001 | $0.00060 | $0.00061 |
| GPT-5OpenAI | ~50estimate | 0.01% | $0.00006 | $0.00500 | $0.00506 |
| Claude Fable 5.1Anthropic | ~67estimate | <0.01% | $0.00067 | $0.0250 | $0.0257 |
| Claude Opus 5Anthropic | ~67estimate | <0.01% | $0.00034 | $0.0125 | $0.0128 |
| Claude Sonnet 5Anthropic | ~67estimate | <0.01% | $0.00013 | $0.00500 | $0.00513 |
| Claude Haiku 4.5Anthropic | ~50estimate | 0.03% | $0.00005 | $0.00250 | $0.00255 |
| Gemini 3.7 FlashGoogle | ~51estimate | <0.01% | $0.00004 | $0.00187 | $0.00191 |
| Gemini 3.1 ProGoogle | ~51estimate | <0.01% | $0.00010 | $0.00600 | $0.00610 |
| Gemini 2.5 ProGoogle | ~51estimate | <0.01% | $0.00006 | $0.00500 | $0.00506 |
About these numbers. Counts marked exact come from the provider's own tokenizer. Everything else is an estimate: Anthropic and Google do not publish a tokenizer you can run in a browser, so nobody can give you an exact figure for those models without calling their API. The estimate is calibrated against real tokenizer output and is usually within about 10%. Claude changed tokenizer at 4.7 — the newer models produce roughly 30% more tokens for the same text, which is why Opus 5 and Sonnet 5 are costed differently from Haiku 4.5.
Prices are list prices per million tokens as of 2026-09-01 and change often — check OpenAI, Anthropic and Google before you budget against them. Discounts for caching and batching are not included.
Example
Input
Summarise the following support thread and list every action item with an owner.
Output
~15 tokens GPT-5 input cost: $0.00002 Context used: 0.01% of 400K
Short prompts cost almost nothing; the number matters once you are pasting whole files or looping over thousands of records.
How to Use LLM Token Counter
- 1
Paste your prompt
Drop in the text, code, or document you plan to send to a model.
- 2
Read the estimate
See an instant token estimate and how much of each model's context window it fills.
- 3
Load exact counts
For OpenAI models, load the real tokenizer to replace the estimate with an exact figure.
What is LLM Token Counter?
Token counts decide two things: whether your prompt fits, and what it costs. Both are awkward to eyeball, because tokens do not line up with words — code, punctuation and non-English text all tokenize far less efficiently than plain English prose. This tool gives an instant estimate as you type, converts it into a cost for the current models from OpenAI, Anthropic and Google, and shows how much of each context window you are using. For OpenAI models you can load the real BPE tokenizer to get an exact count rather than an approximation. Everything runs in the browser, so a real prompt with real data never leaves your machine.
Common Use Cases
- ✦Checking whether a document will fit in a model's context window before sending it
- ✦Estimating what a batch job will cost before running it
- ✦Comparing the price of the same prompt across providers
- ✦Trimming a system prompt that has grown over time
Share
Share a link to this tool. Results can be passed via URL parameters.
https://buildutilities.com/share/llm-token-counterFrequently Asked Questions
More Text Tools
Text processing, counting, comparison, and transformation.