FREE · No Sign-up
Free Tool · AI Text Tools

LLM Token Counter (GPT, Claude, Gemini)

Count tokens for GPT (exact, OpenAI tokenizer), and estimate Claude and Gemini tokens, words and API cost.

Language models read text as tokens, not words, and both API prices and context limits are counted in tokens. This counter gives exact counts for OpenAI models using OpenAI’s own open-source tokenizer, running in your browser, plus estimates for Claude and Gemini and the input cost of your prompt.

Tokens (OpenAI tokenizer)

How It Works

Using LLM Token Counter (GPT, Claude, Gemini)

1

Pick a tokenizer

o200k_base for GPT-4o, GPT-4.1, GPT-5 and newer OpenAI models; cl100k_base for GPT-4 and GPT-3.5; or Claude / Gemini estimates.

2

Paste your text

Counts update as you type: tokens, characters, words and tokens per word.

3

See the tokens

Each token is highlighted so you can see how words are split.

4

Check cost and context

Choose a model price and context size to see what the prompt costs and how much of the window it fills.

Why Use This Tool

What you get with LLM Token Counter (GPT, Claude, Gemini)

Exact OpenAI token counts (o200k_base and cl100k_base) — the same encodings used by OpenAI’s tiktoken library

Token-by-token visualisation

Input cost using prices checked against official pricing pages

Private: text is tokenised in your browser

Works Great With

AI API Cost Calculator

Turn your token counts into a daily and monthly API bill across providers.

Try AI API Cost Calculator →

Tokens in practice

TextRoughly
1 token≈ 4 characters of English, or ¾ of a word
100 tokens≈ 75 words
1,000 tokens≈ 750 words, about 1½ pages
128,000 tokens≈ a 300-page book

These are rules of thumb for English; code, numbers and other languages differ, which is why the exact count matters for long prompts.

Getting exact counts for other models

  • Anthropic Claude: the Messages API has a free token-counting endpoint (count_tokens).
  • Google Gemini: the API’s countTokens method.
  • OpenAI: the open-source tiktoken library — the same encodings used on this page.

Estimate a monthly bill with the AI API cost calculator.

FAQ

LLM Token Counter (GPT, Claude, Gemini) questions

A token is a chunk of text a model processes as one unit — often a whole common word, part of a longer word, a number or punctuation. In English, one token averages roughly four characters or three-quarters of a word, but this varies with language and content.

According to OpenAI’s tiktoken library, GPT-4o, GPT-4.1, GPT-4.5, GPT-5 and the o-series reasoning models use o200k_base, while GPT-4 and GPT-3.5-turbo use cl100k_base. Newer models not yet listed in tiktoken are counted with o200k_base here.

No. Anthropic and Google do not publish their tokenizers for offline use, so the counter shows an estimated range. For exact numbers use Anthropic’s token-counting API or Google’s countTokens API.

Yes. API bills include input and output tokens, and output tokens usually cost several times more. Compare full request costs with the AI API cost calculator.

Tokenizers are trained mostly on English, so other languages and scripts are often split into more, shorter tokens.

More from GrowLytics

Free tools for your site — and for you

More Free Tools

Other tools you can try free