Skip to main content
SK Play Labs logoSK Play Labs

Token Counter

Estimate how many tokens your prompt will use.

Characters

0

Without spaces

0

Words

0

Lines

0

Model familyEstimateLikely range
GPT · OpenAI

Modelled on OpenAI's published byte-pair tokenizer — the closest of the four.

000
Claude · Anthropic

Anthropic's tokenizer isn't public. It runs a little finer than GPT's, so expect modestly more tokens for the same text.

000
Gemini · Google

Google's tokenizer isn't public either. In practice it lands close to GPT for English.

000
Llama · Meta

Open weights, but the count shifts between model generations — treat this as ballpark.

000
Would it fit in acontext?

Paste some text above to see how much of a context window it would take.

Pick the window size you're actually working with — we deliberately don't list it per model, because published context limits change with every release and a stale table would be worse than none.

Runs entirely in your browser — nothing you enter is uploaded or sent to a server.

These are estimates, not exact counts. Only OpenAI publishes its tokenizer — Anthropic's and Google's aren't public — so no browser tool can give you an exact Claude or Gemini figure. Ours averages within about 8% on ordinary prose and drifts further on URLs and code. Check against your provider's own tokenizer before anything you're billed for. Read our full disclaimer.

About this tool

Language models don't read characters or words — they read tokens, chunks of roughly four to six characters that a model's tokenizer carves text into. That's the unit you're billed in and the unit a context window is measured in, which makes "how long is this prompt, really?" a question worth answering before you send it. Paste your text and this gives you an estimate for each of the major model families, a likely range rather than a single falsely-precise number, and a check on whether it would fit the context size you're working with.

A rule of thumb

Ordinary English runs about four to six characters per token, so a 2,000-word article lands near 2,600 tokens. Chinese and Japanese cost far more per character, and long numbers or URLs cost more than they look — a single web address can easily be a dozen tokens.

How to use

  1. 1Paste your prompt, document, or whatever you're about to send a model.
  2. 2Read the estimate for each model family, and the range around it.
  3. 3Pick the context window you're working with to see how much of it you'd use.
  4. 4Leave headroom — the model's own reply has to fit in that window too.

Features

  • Estimates for GPT, Claude, Gemini and Llama, each with its own uncertainty band.
  • Splits text the way a real byte-pair tokenizer does, rather than dividing characters by four.
  • Handles CJK, emoji and long numbers, which naive counters get badly wrong.
  • A context-window check you choose the size for, so it can't go stale.

Frequently asked questions

How accurate is this?

The estimator was fitted against OpenAI's real tokenizer on a mixed set of prose, prompts, code, JSON and CJK text, and averages about 8% absolute error — closer to 3–5% on ordinary prose and prompts, and further out on dense punctuation like URLs. It's built for planning, not billing.

Why can't you give exact Claude or Gemini counts?

Because those tokenizers aren't published. Anthropic and Google both keep theirs private, so any browser tool showing an exact Claude or Gemini number is either guessing or quietly sending your text to a server. We'd rather show you an honest range.

Why don't you just use the real OpenAI tokenizer?

It would be exact for GPT, but the token tables are 20 to 50 megabytes — an absurd download for a page whose job is to tell you roughly how big a prompt is, and it still wouldn't help with the other three families.

Why is my Chinese text so many more tokens than the English?

Tokenizers are trained mostly on English, so English words often compress into a single token while a Chinese character frequently costs one on its own. The same meaning can cost noticeably more in a non-Latin script — worth knowing when you're budgeting a long prompt.

Why don't you list the context window for each model?

Because published context limits change with almost every release, and a table that's quietly a year out of date is worse than no table. Pick the size you're actually working with instead.

More developer tools

View all