LLM Token Counter

Before you send a long prompt, paste a document into a chat, or wire a text into an API call, it helps to know roughly how many tokens you’re holding. This counter gives you that figure for the three big model families — GPT-style, Claude-style and Gemini-style — updating as you type, with your character and word counts alongside.

Every number here is an estimate, and the tool says so on its face. There is no exact counter for Claude or Gemini outside the providers’ own systems, and this page doesn’t pretend otherwise: each family shows a likely range next to its estimate, the method is printed in full on the tool itself, and the context-window bars are worked out from each family’s own estimate — so you can see not just a number, but how much trust to put in it.

That honesty is the point. A prompt that “fits” according to a bare, unexplained count is how requests get rejected at a context limit. A range you can plan around — trim until even the top of the range sits comfortably inside the window — is genuinely useful, and it’s what this tool is built to give you.

A long printed paper strip with blurred text unrolling from a small printer beside a wooden ruler and a laptop on a desk

LLM Token Counter

Paste a prompt or a document and see roughly how many tokens it uses for GPT, Claude and Gemini — as a labelled estimate with its likely range, plus how much of each model’s context window it fills.

~0 GPT-style tokens Estimated for GPT-4o / GPT-4 style tokenizers.
~0 Claude-style tokens Estimated for Claude-style tokenizers.
~0 Gemini-style tokens Estimated for Gemini-style tokenizers.
0Characters
0Words
—Characters per token (GPT-style)

Context window usage

How these estimates are made — because an unexplained number is how token counters earn distrust. The text is split into chunks: words, numbers, individual symbols, and whitespace runs. A word scores roughly one token per 4–5 letters, a run of digits about one per 3 digits, each symbol one token, and long whitespace runs (indentation, blank lines) a little extra. The GPT-style figure is that base count. The Claude-style figure applies ×1.2, because published comparisons of the same texts through Claude’s own counting endpoint consistently land roughly 15–30% above the GPT count. The Gemini-style figure uses the base rate, because published measurements put Gemini in the same characters-per-token class as GPT — the two estimates will often match, though the real tokenizers still split any given text differently. On ordinary English prose these estimates usually land within about ±20% of a provider’s official count, which is why each card shows a likely range; code, JSON, URLs and non-English text can miss by more, and short texts swing the most. For an exact figure — before a large paid run, or when you are close to a limit — use the provider’s own counter or counting endpoint. Context window sizes are the headline figures published in November 2026; providers revise them, so check the model card for the current number. Everything is counted locally in your browser; your text never leaves this page.

How it works

The estimator reads your text the way a tokenizer roughly does — in chunks — rather than with a single flat division. It splits the text into words, runs of digits, individual symbols and whitespace runs, then scores them by printed rules: a word counts about one token per 4–5 letters, a run of digits about one per 3 digits, each symbol counts one, and long whitespace runs (deep indentation, blank lines) add a little. Short common words come out at one token; long rare words fragment into more — the same shape real tokenizers produce, arrived at by rules you can read.

That base count is the GPT-style estimate. The Claude-style estimate applies ×1.2 to it, because published comparisons that run identical texts through Claude’s own counting endpoint consistently land roughly 15–30% above the GPT count for the same text — Claude’s tokenizer simply splits text into smaller pieces. The Gemini-style estimate uses the base rate, because published measurements put Gemini in the same characters-per-token class as GPT; the two estimates will often match, though the real tokenizers still split any particular text differently.

Each estimate is shown with its likely range — 20% below to 25% above the headline figure. On ordinary English prose, estimates made this way usually land inside that band; code, JSON, URLs and non-English text can miss by more, and very short texts swing the most, because a handful of chunks one way or the other moves the percentage a long way. The context bars then divide each family’s estimate by that family’s headline window — 128,000 for GPT-4o, 200,000 for Claude, 1,000,000 for Gemini, and 8,192 for the original GPT-4, the window sizes published in November 2026. Providers revise windows over time, so treat the bars as planning guides and check the model card for the current figure. When you need an exact count — a large paid run, or a prompt sitting close to a limit — the provider’s own tokenizer or counting endpoint is the right tool, and the FAQ says where this estimate hands over to it.

How to use it

  1. Paste or type your text into the box — a prompt, a system message, a whole document. The estimates update as you type.
  2. Read the three family cards: the estimate for GPT-style, Claude-style and Gemini-style tokenizers, each with its likely range.
  3. Check the counts row — characters, words, and the characters-per-token your text works out at, a quick smell test (ordinary English usually sits near 4).
  4. Look at the context window bars to see what share of each model’s window your text fills, using that family’s own estimate.
  5. Trimming to fit? Edit the text right there and watch the bars move — aim to fit the top of the range, not just the headline number.
  6. Press Copy results to take the three estimates and counts away as plain text.

A worked example

Press Load an example and the tool fills in a typical system prompt:

“You are a helpful assistant. Summarize the following article in three short bullet points, keeping every name and date exactly as written.”

The counts row reads 138 characters and 22 words. The family cards report:

  • GPT-style: ~33 tokens (likely range 26–42)
  • Claude-style: ~40 tokens (likely range 32–50)
  • Gemini-style: ~33 tokens (likely range 26–42)

That’s 4.2 characters per token — right in the band ordinary English produces, which is why the ranges here are comparatively tight. The Claude figure is the same base count with the ×1.2 calibration applied (33 × 1.2 ≈ 40), and the Gemini figure matches the GPT one because both families measure out at roughly the same characters per token on published tests.

The context bars put the prompt in perspective: 0.03% of GPT-4o’s 128,000-token window, 0.02% of Claude’s 200,000, under 0.01% of Gemini’s 1,000,000 — and 0.40% of the original GPT-4’s 8,192-token window. A short prompt is a rounding error in a modern window; the same maths on a 90,000-word document dump is where these bars start earning their keep.

Who it is for

Developers sizing prompts and RAG payloads before an API call; prompt engineers checking that a system prompt plus context still leaves room for the answer; writers and researchers pasting long documents into chat tools and wanting to know what fits; and anyone who has compared two online counters, got two different numbers, and wants to know which one to believe — and why the honest answer is a range.

Why use this tool

  • A range, not a false point estimate — every family shows its likely band next to the headline number, so you plan against the top of the range instead of discovering the error at a context limit.
  • Calibrated per family — Claude’s estimate carries the ×1.2 that published endpoint comparisons support, instead of one shared number quietly reused for every model.
  • Window fit done for you — four named context windows, each checked against its own family’s estimate, with the usage bar and percentage worked out live as you edit.
  • The method is printed on the tool — chunk rules, calibration factors and the honest error band are all stated on the page, so you can judge the number instead of taking it on faith.

Frequently asked questions

What is a token?

A token is the chunk of text a language model actually reads and bills on. Models don’t process letters or whole words — a tokenizer splits text into pieces that are often a word, part of a word, or a punctuation mark. As a rough guide, ordinary English runs at about 1.3 tokens per word, so a 750-word page is roughly 1,000 tokens.

Why are these counts estimates rather than exact?

Because exact counting needs the model’s own tokenizer. OpenAI publishes its tokenizer as a library, but it is a large dependency this tool deliberately doesn’t load; Anthropic and Google don’t publish theirs at all — the only exact route is their own counting endpoints. So this counter estimates from the shape of your text using printed rules, and labels the result with its likely range rather than dressing an estimate up as a measurement.

Why is the Claude estimate higher than the GPT estimate for the same text?

Claude’s tokenizer splits text into smaller pieces than GPT’s does. Comparisons that run identical texts through Anthropic’s official counting endpoint land roughly 15–30% above the GPT count on prose and code — so the Claude-style estimate applies a ×1.2 calibration to the base count instead of showing the same number and letting you under-plan.

Why do the GPT and Gemini estimates match?

Published measurements put both families at roughly the same characters per token — around four — for ordinary English, so a calibrated estimate lands on the same figure. The real tokenizers are different programs and will disagree on plenty of individual texts, especially code and non-English writing; the match means “same size class”, not “same tokenizer”.

How accurate is the estimate for code or JSON?

Less accurate than for prose, and the range matters more. Code and JSON are dense with symbols, indentation and repeated structural characters, which real tokenizers split less predictably — a prose-calibrated estimate can miss by more than its usual band. Use the top of the range for planning, and for a payload that has to fit, verify with the provider’s own counter before you send it.

Is my text uploaded or stored?

No. The counting runs entirely in your browser, on your device. Nothing you paste is sent to a server or kept after you close the page — which is why you can measure a private system prompt or an unpublished document here.

What is a token?

A token is the chunk of text a language model actually reads and bills on. Models don’t process letters or whole words — a tokenizer splits text into pieces that are often a word, part of a word, or a punctuation mark. As a rough guide, ordinary English runs at about 1.3 tokens per word, so a 750-word page is roughly 1,000 tokens.

Why are these counts estimates rather than exact?

Because exact counting needs the model’s own tokenizer. OpenAI publishes its tokenizer as a library, but it is a large dependency this tool deliberately doesn’t load; Anthropic and Google don’t publish theirs at all — the only exact route is their own counting endpoints. So this counter estimates from the shape of your text using printed rules, and labels the result with its likely range rather than dressing an estimate up as a measurement.

Why is the Claude estimate higher than the GPT estimate for the same text?

Claude’s tokenizer splits text into smaller pieces than GPT’s does. Comparisons that run identical texts through Anthropic’s official counting endpoint land roughly 15–30% above the GPT count on prose and code — so the Claude-style estimate applies a ×1.2 calibration to the base count instead of showing the same number and letting you under-plan.

Why do the GPT and Gemini estimates match?

Published measurements put both families at roughly the same characters per token — around four — for ordinary English, so a calibrated estimate lands on the same figure. The real tokenizers are different programs and will disagree on plenty of individual texts, especially code and non-English writing; the match means “same size class”, not “same tokenizer”.

How accurate is the estimate for code or JSON?

Less accurate than for prose, and the range matters more. Code and JSON are dense with symbols, indentation and repeated structural characters, which real tokenizers split less predictably — a prose-calibrated estimate can miss by more than its usual band. Use the top of the range for planning, and for a payload that has to fit, verify with the provider’s own counter before you send it.

Is my text uploaded or stored?

No. The counting runs entirely in your browser, on your device. Nothing you paste is sent to a server or kept after you close the page — which is why you can measure a private system prompt or an unpublished document here.