Skip to content
Image
PDF
Text
Developer
Calculators
Language
Theme

AI token counter

Paste a prompt or a document and see how many tokens it uses, how much of each model's context window it fills and what the input costs.

Tokens
0
Characters
0
Words
0

Tokenizer

Exact count with the o200k_base tokenizer.

Paste text or drop a file to count tokens.

Claude and Gemini

Claudeestimate
0
Geminiestimate
0

These are estimates, not exact counts. Anthropic and Google do not publish their tokenizers for browsers. We scale the GPT count by their published English ratios: Claude about 1.8 tokens per word (×1.35), Gemini about 1.4 tokens per word (×1.07). Code and other languages can differ more.

Context window

Share of each model's context window and the input cost. Limits and prices checked on 19 Nov 2026.

  • GPT-5.50%

    0 of 1,050,000 tokens · input price not listed

  • GPT-5.4 mini0%

    0 of 400,000 tokens · input price not listed

  • GPT-4o0%

    0 of 128,000 tokens · input price not listed

  • Claude Opus 5.5estimate0%

    ≈ 0 of 1,000,000 tokens · input price not listed

  • Claude Sonnet 5.5estimate0%

    ≈ 0 of 1,000,000 tokens · input price not listed

  • Claude Haiku 5.5estimate0%

    ≈ 0 of 1,000,000 tokens · input price not listed

  • Gemini 4 Neonestimate0%

    ≈ 0 of 1,048,576 tokens · input price not listed

  • Gemini 3.8 Flashestimate0%

    ≈ 0 of 1,048,576 tokens · input price not listed

Sources: OpenAI, Anthropic, Google

Token view

Tokens appear here in alternating colors.

Runs in your browser. Your files are not uploaded anywhere.

How to use it

  1. 1Paste your text or open a .txt, .md, .json or .csv file.
  2. 2Pick the tokenizer: GPT-5 and GPT-4o, or the older GPT-4 and GPT-3.5.
  3. 3Read the token count, the context window table and the input cost.
  4. 4Open the token view to see how the text is split.

Questions and answers

Is the count exact?

For OpenAI models, yes. The tool uses the same tokenizer (o200k_base or cl100k_base) as the OpenAI API. Chat messages add a few extra tokens per message.

Why are Claude and Gemini only estimates?

Anthropic and Google do not publish their tokenizers for browsers. We take the exact GPT count and scale it with the words-per-token ratios they publish for English text. Real counts can differ by 10-20%, more for code and other languages.

What is a context window?

The maximum number of tokens a model can read and write in one request. If your text is longer, you need to shorten it or split it.

Where do the prices and limits come from?

From the official pricing and model pages of OpenAI, Anthropic and Google. We show the date we checked them. Prices are input prices per 1 million tokens in US dollars.

Is my text sent anywhere?

No. The tokenizer runs in your browser, so your text never leaves your device.

More tools