AI Token Counter
Count exact LLM tokens for GPT, Claude and Gemini prompts.
Text or prompt
Loading tokenizer…
Token breakdown
About the AI Token Counter
Tokenize any prompt with the real BPE tables used by GPT-4o, GPT-4 and embedding models (o200k_base, cl100k_base, p50k_base). See token counts, tokens-per-word, context-window usage and input cost, plus raw token IDs — all computed offline in your browser.
Examples
Short prompt
Summarise this article in three bullets.Output
9 tokens (o200k_base)Keyboard shortcuts
- Copy the main outputCtrl / ⌘ + Shift + C
- Download the resultCtrl / ⌘ + S
- Share this toolCtrl / ⌘ + Shift + S
- Reset the inputsAlt + R
- Open the tool search paletteCtrl / ⌘ + K
Related tools
LLM API Cost Calculator
AI & LLM
Estimate GPT, Claude and Gemini API spend per call and per month.
LLM Context Window Calculator
AI & LLM
See if your system, context and user messages fit the model window.
AI Dataset Deduplicator
AI & LLM
Remove exact and near-duplicate rows from fine-tuning datasets.
AI Dataset Statistics Analyzer
AI & LLM
Profile a JSONL training set: token stats, roles, duplicates and cost.
AI PII & Secret Redactor
AI & LLM
Strip emails, keys, tokens and personal data before prompting an LLM.
AI Tool Schema Builder
AI & LLM
Build function-calling schemas for OpenAI, Claude, Gemini, MCP and the AI SDK.
Frequently asked questions
Read more
- How LLM tokens really work (and why your word count is a bad estimate)
BPE splits words, punctuation and whitespace into pieces. Here is how tokens are counted, why context windows overflow, and how to plan a prompt that fits.
Version 1.0.0 · Updated 2026-08-14 · Runs entirely in your browser