Setup loaded. Click Count Tokens.

Prompt Utilities

Token Counter

A token is not a character and not a word — and the gap is where API bills come from. Paste a prompt to see an honest token estimate (a range, never a fake-precise number), how it shifts with content type and model, and what it costs per call and per 1,000 calls. It answers how many and how much — for will it fit, that's the Context Window Estimator. Runs entirely in your browser; your text is never sent anywhere.

Paste a prompt, document, transcript, or code. Nothing leaves your browser — the report shows counts only, never your text.

Model

Family sets the token factor and the price; the same text counts a little differently per tokenizer.

Assumed Response

Output tokens cost more than input — this sets the assumed reply size for the cost line.

Token Analysis (live — estimate & cost, not the report)

            

AI Resource Library

Resources for this tool

View All Resources →
Prompt Engineering

Count Tokens in Code

Code is not prose: symbols, indentation, and punctuation push it to more tokens per character. This counts a real snippet so the difference is visible.

View Resource →

How it works

Paste a prompt, document, transcript, or code; pick a model (GPT-5, Claude Opus, Claude Sonnet, or Gemini Pro) and an assumed response length. The Token Estimation Engine detects the content type deterministically — Prose, Code, Mixed, or CJK-heavy — and applies a content-aware characters-per-token ratio, then a mild per-family factor, to produce a token estimate as a RANGE, never a single false-precise number. Click Count Tokens for the report: the token estimate (range, plus tokens per word and per character), a Cost Estimate (input cost, output cost for the assumed response, combined per call, and per 1,000 calls), Model Notes (the same text estimated across all four models — a count, not a fit check), Usage Guidance (small/medium/large scale reference), and Estimation Notes that explain why the number varies. Everything runs in your browser; the report shows counts only and never echoes your text. The figures are honest estimates, not tokenizer output, and pricing is labeled approximate and dated because providers change rates.

Use cases

  • Getting a fast, honest token count for a prompt
  • Pricing an API call per request and per 1,000 calls
  • Seeing how the same text counts differently across GPT, Claude, and Gemini
  • Understanding why tokens are not characters or words

Pro tips

  • Trust the range, not a single number. Tokenizers genuinely disagree on the same text, so an honest count is a range — anyone showing one exact figure for every model is rounding away the truth.
  • Watch the per-1,000-calls line, not the per-call one. A single call costs a fraction of a cent, which is exactly why teams underestimate the bill; the scaled figure is the real budget.
  • Mind the content type. Code tokenizes denser than prose, and CJK and non-Latin scripts use more tokens per character — the detected type tells you which ratio is in play.
  • Output usually costs several times more than input. Set a realistic assumed response length so the cost line reflects the whole call, not just the prompt half.

FAQ

How is this different from the Context Window Estimator?

Different questions entirely. The Token Counter answers "how many tokens, and how much does it cost?" — it returns a number and a price. The Context Window Estimator answers "will it fit?" — it subtracts a response budget from a model's context window and returns a fit verdict (Safe, Near Limit, Will Not Fit) plus routing to the Long Prompt Splitter. Counter gives you a count; Estimator makes a decision. They share the same underlying estimation math but answer opposite questions, and they cross-link.

How is this different from a character counter?

A character counter measures text units a human reads — characters, words, lines. This measures model units — tokens, the sub-word chunks a model actually processes and bills. A token is neither a character nor a word: English averages roughly four characters and three-quarters of a word per token, and the ratio shifts with language and content. If you need a character or word count for a platform limit, that's the Character Counter; if you need to know what the model will see and charge, that's this tool.

Are these exact token counts?

No, and they're not pretending to be. These are character-based estimates with content-type awareness, reported as a range — never "exact token count". The only way to get an exact figure is to run the model's own tokenizer, and even then it's exact only for that one model, because every tokenizer is different. The range is the honest answer; a single confident number across all models would be a lie.

Why does the same text show different token counts per model?

Because each model has its own tokenizer. GPT, Claude, and Gemini split text into tokens differently, so the same string is a different count on each — the difference is largest for code and non-English text. The report shows all four model estimates side by side precisely so you can see the spread, and it's why the headline estimate is a range rather than a single point.

How accurate is the cost estimate?

The cost is the token estimate multiplied by the model's published rate, so it inherits the token range and adds pricing uncertainty on top. Prices are labeled approximate and dated (currently June 2026) because providers change them without notice — always confirm current rates before relying on a number for budgeting. For exact spend, your provider's billing dashboard is authoritative; this tool is for planning, not invoicing.

Can I use this to lower my token usage?

Yes, as the measurement half. Count a prompt to see what padding and verbosity cost in tokens, then trim it — but the trimming itself, removing redundancy and noise without changing meaning, is the Prompt Cleaner's job. The loop is: count here, clean there, count again, and watch the per-1,000-calls figure drop. This tool measures; the Cleaner cuts.

Is my text sent anywhere?

No. The whole tool runs in your browser with deterministic estimation — no AI API, no tokenizer call, no server round-trip. Your text never leaves the page, and the report deliberately shows counts only, never echoing your content back. Copy or download the report yourself.