Count LLM tokens
Estimate how many tokens your prompt uses in GPT, Claude, Gemini, Llama and other models, with character, word and sentence counts. Free.
- Files never leave your device
- Free, no sign-up
- No watermark
About LLM Token Counter
Estimate the size of a prompt before you send it to an AI model. Paste text, a prompt or code and see estimated token counts for popular models such as GPT, Claude, Gemini and Llama side by side, along with characters, words and sentences. It helps you stay within context limits and estimate API costs. Estimates use model-specific heuristics and run in your browser.
How to use LLM Token Counter
- 1
Paste your prompt, text or code.
- 2
Read the estimated tokens for each model.
- 3
Check characters, words and sentences.
- 4
Trim the text if you are near a limit.
Why use this tool
- Estimates for several popular model families.
- Side-by-side comparison.
- Character, word and sentence counts.
- Works with prose and code.
- Private: prompts never leave your browser.
Frequently asked questions
They are heuristic estimates, typically within 5–10% of the real tokenizer. Use the provider’s tokenizer for exact billing.
A chunk of text a model reads, often around four characters of English.
Each model family uses its own tokenizer and vocabulary.
Often, yes. Symbols and indentation can increase the count.
No. Counting happens locally and nothing is sent to any model.
No. Everything is processed in your browser tab. Nothing you type or paste is sent to CodeMites or any other server.
Yes. There is no account, no watermark and no usage limit. The tool runs in your own browser, so there is no server cost to charge you for.
Yes. It runs in any modern browser on Android and iOS as well as on Windows, macOS and Linux, with nothing to install.
Yes, once the page has loaded. Everything runs in your browser, so you can keep working on a train or plane without a connection.
Related tools
All Developer tools →- Markdown PreviewWrite Markdown and see rendered HTML live, with tables, code blocks and task lists.
- Diff CheckerCompare two texts or code files and highlight added, removed and changed lines in split or unified view.
- Regex TesterTest regular expressions with live match highlighting, capture groups, flags and a quick-reference cheat sheet.
- Cron Expression BuilderBuild cron expressions with dropdowns, read them in plain English and preview the next run times.
- Chmod CalculatorSet Unix file permissions with checkboxes and get the octal value, symbolic notation and chmod command.
- CIDR CalculatorCalculate network address, broadcast, host range, subnet mask and host count from CIDR notation, with binary view.