LLM Token Counter — Count Tokens for Any Model
🔒 Runs in your browser — nothing is sent to a serverLLM token counter for any modern model — paste a prompt, document or transcript and see the token count for OpenAI GPT, Anthropic Claude, Google Gemini, Meta Llama and Mistral side-by-side, plus the live input + output cost for the selected model. Pick a model, type in expected output length, and the page updates instantly without sending a single character to a server. Useful for budgeting an API call, checking whether a long prompt will fit a context window, or comparing how the same text tokenises across providers before switching stacks.
0 chars · 0 chars (no spaces) · 0 words · 0 lines
0
Tokenizer family: gpt · approximate ±10%
Pricing snapshot: 2026-05-16. Standard tier; not including cached or batch discounts.
Same input text counted under each tokenizer family. Useful when switching providers — a prompt that fits GPT-4o may overflow Llama, or cost less under Gemini.
How to read the token counter
The top panel shows the count for the model you selected — this is the number you should plug into cost estimates. The cross-tokenizer panel shows the same text under every other family, so you can quickly see if migrating off OpenAI would change your bill. The cost panel multiplies your input tokens by the model's standard input rate, your estimated output tokens by the standard output rate, and sums them. Cached and batch discounts are not applied here — those have dedicated calculators in the AI Tools section.
When the heuristic breaks down
The MVP-1 counter assumes English-heavy prose. Three cases produce noticeably wrong numbers: highly compressed JSON or minified code (the counter under-estimates by 10–20%); CJK scripts like Chinese, Japanese or Korean (each character is 1.5–2 tokens, not 1/4); and prompts with many escape sequences or Unicode emoji combining characters (under-estimate by up to 30%). For exact OpenAI counts the planned MVP-2 release ships the real `gpt-tokenizer` BPE encoder as a lazy-loaded chunk on this page only.
Examples
You are a helpful assistant. Answer in one sentence. What is the capital of France?~22 tokens (GPT), ~23 tokens (Claude). At GPT-5.5 standard rate $5/M input this is ≈ $0.00011 per request.~3,000 characters of Markdown (about 500 words)~750 tokens across all major tokenizers. GPT-5.5 input cost: $0.00375. Claude Sonnet 4.6 input cost: $0.00225.~200,000 characters from chunked documents + a short user questionFills 5% of Gemini 2.5 Pro 1M context, 25% of Claude Haiku 4.5 200K context, overflows any 32K model.