AI Token Counter
Paste a prompt and see what it actually costs. Exact token counts for GPT models from the real tokenizer — not a word-count guess — plus per-model pricing and context usage. Runs entirely in your browser.
- Runs in your browser
- Nothing uploaded
- No signup
- Free forever
0
Tokens · GPT-5.6 Sol
0
Characters
0
Words
—
Tokens per word
| Model | Tokens | Context used | As input | Same size out |
|---|---|---|---|---|
| OpenAI | ||||
| GPT-5.6 Sol | 0 | not published | $0 | $0 |
| GPT-5.6 Terra | 0 | not published | $0 | $0 |
| GPT-5.6 Luna | 0 | not published | $0 | $0 |
| GPT-5.5 | 0 | — | $0 | $0 |
| GPT-5.4 | 0 | — | $0 | $0 |
| GPT-5 | 0 | not published | $0 | $0 |
| GPT-5 mini | 0 | not published | $0 | $0 |
| GPT-4o | 0 | not published | $0 | $0 |
| GPT-4o mini | 0 | not published | $0 | $0 |
| GPT-3.5 Turbo | 0 | not published | $0 | $0 |
| Anthropic | ||||
| Claude Opus 5est | 0 | — | $0 | $0 |
| Claude Fable 5est | 0 | — | $0 | $0 |
| Claude Sonnet 5est | 0 | — | $0 | $0 |
| Claude Haiku 4.5est | 0 | — | $0 | $0 |
| Gemini 3.1 Proest | 0 | not published | $0 | $0 |
| Gemini 3.6 Flashest | 0 | not published | $0 | $0 |
| Gemini 3.5 Flash-Liteest | 0 | not published | $0 | $0 |
Exact counts run the vendor's own BPE vocabulary in your browser. Estimated counts are scaled from that result — Anthropic and Google publish no offline tokenizer, and fetching an exact count would mean sending your prompt to them. The range shown is ±15%.
Prices are standard-tier, text-input rates taken from each vendor's own pricing page on 2026-08-07. Batch, cached-input, priority and long-context tiers cost different amounts.
How to check what a prompt costs
Token counts decide both your bill and whether a prompt fits in a model's context window. Here's how to read them.
- 1
Paste your prompt
Drop the text into the box above. Nothing is sent anywhere — the tokenizer runs in your browser tab.
- 2
Read the exact count
The headline figure is an exact count from OpenAI's own BPE vocabulary, the same one the API uses to bill you.
- 3
Compare across models
The table shows every model's token count, what share of its context window that uses, and the cost at standard input and output rates.
- 4
Watch the estimate labels
Rows marked "est" are estimates with a range, because those vendors publish no offline tokenizer. Treat them as a bracket, not a bill.
Why most token counters are guessing
The common approach is to divide your word count by an average words-per-token ratio. That is fine for ordinary English prose and wrong for everything else, because a word count cannot see what is inside the words. Punctuation, casing, numbers, indentation and emoji all produce tokens that no ratio accounts for.
The gap is largest exactly where it matters. A line of TypeScript runs close to two tokens per word, against roughly 1.2 for English prose. Japanese is worse still, because it isn't written with spaces: the sentence 日本語は英語よりも多くのトークンを消費します。 counts as a single "word" to any whitespace-based estimator, and tokenizes to 18. This tool runs the real byte-pair-encoding algorithm instead, so the number you see for a GPT model is the number OpenAI bills.
Which counts are exact, and which are estimates
OpenAI publishes its tokenizers. o200k_base covers GPT-4o and the GPT-5 family; cl100k_base covers GPT-4 and GPT-3.5. Both are open vocabularies, so those counts are computed locally and are exact.
Anthropic and Google publish no offline tokenizer. The only way to get an exact Claude or Gemini count is to call the vendor's token counting endpoint, which would mean uploading your prompt to a third party — the one thing this page promises not to do. So those rows are scaled from the real BPE count and labelled with a range. Anthropic's own documentation notes that OpenAI's tokenizer undercounts Claude by roughly 15–20% on typical text and by more on code, which is the anchor the scaling uses.
Claude's tokenizer has also changed between model generations, so a single "Claude token" figure would be misleading even if one existed. Treat the estimated rows as a bracket for budgeting, and use Anthropic's count_tokens endpoint when you need a number to bill against.
About the prices
Every rate is transcribed from the vendor's own pricing page, not from a third-party aggregator — those disagree with each other and were measurably wrong when checked against the source.
The figures are standard-tier, text-input rates. Vendors now layer batch, flex, priority, cached-input, long-context and per-modality pricing on top of those, so a single number per model is a starting point rather than a quote. Check the vendor's page before committing to a budget.
An export is a snapshot. Savelore is the archive.
This tool reads a file that was already out of date the moment it was generated. Every chat since then is missing, and getting it back means requesting another export and waiting for another email. Savelore captures responses, highlights and whole conversations the moment they happen — across ChatGPT, Claude and Gemini — into one archive you can search on any day, not just the day you exported.
Frequently asked questions
Is my text sent anywhere?
No. The tokenizer runs in your browser. The vocabulary file downloads once when you start typing, and after that counting works with no network at all — you can disconnect and keep using it.
Are the GPT token counts exact?
Yes. They come from OpenAI's published BPE vocabularies — o200k_base for GPT-4o and GPT-5 models, cl100k_base for GPT-4 and GPT-3.5 — which is the same tokenization the API bills on.
Why are Claude and Gemini counts only estimates?
Neither Anthropic nor Google publishes an offline tokenizer. Exact counts are available only from their own API endpoints, which would require uploading your prompt. Rather than do that, or pretend a guess is exact, those rows show a scaled figure with a range and an "est" label.
How accurate are the estimates?
They are anchored to Anthropic's published statement that OpenAI's tokenizer undercounts Claude tokens by about 15–20% on typical text. Expect them to be close on prose and looser on code or non-English text. Use them for budgeting, not for reconciling an invoice.
Why does my code use so many more tokens than the word count suggests?
Tokenizers split on sub-word units. Code is dense in punctuation, symbols, indentation and camelCase identifiers, all of which fragment into separate tokens. This is exactly where word-ratio estimators break down and why this tool runs the real algorithm.
Do the prices include batch or cached-token discounts?
No. The table shows standard-tier text pricing. Batch, flex, priority, cached-input and long-context tiers are all priced differently, and some vendors charge more above a prompt-size threshold.
Does the count include system prompts and tool definitions?
Only what you paste. In a real API call your system prompt, tool schemas and prior conversation turns are all billed as input too, so a production request is usually much larger than the message alone.
Do I need an account?
No account, no email, no signup. It's a static page that loads a tokenizer.