LLM Token Counter
Paste a prompt to count its tokens and see what it would cost to send. Your text never leaves your browser.
The tokenizer (about 2 MB) loads the first time you type.
| Model | Cost per request | Per 1,000 requests | |
|---|---|---|---|
| Loading prices… | |||
Input cost only, assuming your text is the whole prompt. Only the OpenAI figures are exact for this tokenizer; other providers use different tokenizers, so treat their numbers as estimates.
What is a token?
Language models read text as tokens, which are chunks of characters rather than whole words. In English a token is roughly four characters or three quarters of a word, but code, numbers, and non-English text usually split into more tokens per character. Providers bill by tokens, so the count directly sets your cost.
How accurate is this counter?
- The count uses the
o200k_baseencoding used by recent OpenAI models, computed locally in your browser. - Claude, Gemini, DeepSeek, Grok and Mistral each use their own tokenizer, so their real counts can differ, sometimes noticeably. For exact billing numbers, use the usage field returned by the provider's API.
- Chat formatting, system prompts, and tool definitions add tokens on top of your raw text.
Frequently asked questions
- Is my text uploaded anywhere? No. Counting happens in your browser. Only the page's visit analytics are collected.
- Why do non-English texts cost more? Tokenizers are optimized for common English text, so many other languages need more tokens for the same meaning.
- How do I estimate a whole month of spend? Use the cost calculator with your expected monthly input and output volume.
Tokenizer: gpt-tokenizer (MIT). Price data: LLMRates (CC BY 4.0). Prices are USD list prices and may change without notice; confirm on the provider's pricing page.
This page uses Google Analytics to count visits. See the privacy policy. From Priorstack.