Free tool · Build

AI Token Counter

Paste or type any text below and this tool counts exactly how many tokens it becomes, using the real GPT-4o tokeniser running in your browser, and shows you precisely where each token boundary falls. Tokens are the units AI models actually read, and they drive both cost and context limits.

Tokeniser: o200k (GPT-4o)
30
Tokens
155
Characters
27
Words
2
Sentences
Token breakdown30 tokens
Large·language·models·don't·read·words·—·they·read·tokens.·A·token·is·roughly·four·characters·of·English,·so·this·sentence·costs·more·than·you·might·guess.

Exact for OpenAI’s o200k tokeniser (GPT-4o, GPT-4.1 and the o-series). Anthropic’s Claude and Google’s Gemini use their own tokenisers, so their counts differ — usually within a few percent for English prose. Coloured chips show each token; a · marks a space the token carries, and marks a byte-fragment token (common with emoji or non-Latin scripts).

What is a token?

When you send text to an AI model like GPT-4o, Claude or Gemini, the model does not see your letters or even your words. It sees tokens: short chunks of text that the model was trained to recognise. A token can be a whole common word (the, cat), a piece of a longer word (token + isation), a number, a space plus a word, or a punctuation mark. The process of chopping text into these chunks is called tokenisation.

Models work this way because it is a sweet spot between two extremes. Working letter by letter would make sequences painfully long; working word by word would need an impossibly large dictionary and would choke on new words. Sub-word tokens give models a compact, flexible vocabulary — typically 50,000 to 200,000 tokens — that can spell out anything, including words it has never seen.

How many tokens is a word?

The handy rule of thumb for English is:

  • 1 token ≈ 4 characters of English text
  • 1 token ≈ ¾ of a word — so 100 tokens ≈ 75 words
  • 1,000 tokens ≈ 750 words ≈ about 1.5 pages
  • 1 page (~500 words) ≈ 650 tokens

These ratios shift with the content. Dense code, JSON, URLs, emoji, and languages other than English tend to use more tokens per character, because the tokeniser has to fall back on smaller pieces. Plain, common English uses the fewest.

Why token count matters

1. It is your bill

Almost every AI API charges per token, usually with separate prices for the tokens you send (input) and the tokens the model generates (output). If you are building anything on top of an AI API, token count is the single biggest lever on cost. Trimming a bloated system prompt from 2,000 tokens to 500 can cut a meaningful slice off every single call. To price a specific prompt, pair this counter with our LLM cost calculator.

2. It decides what fits

Every model has a context window: the maximum number of tokens it can hold in mind at once, covering your prompt, any documents you attach, the conversation so far, and the reply. If your input plus the expected answer exceeds that window, the model has to truncate or forget. Counting tokens first tells you whether your document will fit — see our context window calculator to translate a token limit into pages.

How this token counter works

This tool runs the real OpenAI tokeniser — the o200k byte-pair encoding used by GPT-4o, GPT-4.1 and the o-series — right in your browser. It encodes your text into token IDs to get the exact count, then decodes each ID back so the coloured breakdown shows precisely which characters became which token, including the leading spaces real tokenisers attach to words. Because it all happens locally, the GPT count is exact rather than an estimate, and your text is never uploaded. Anthropic and Google use different tokenisers, so Claude and Gemini counts differ by a few percent — but this is a reliable stand-in for all three.

Tips to use fewer tokens

  • Tighten your prompts. Remove filler, repeated instructions and long examples you do not need. Shorter prompts cost less on every call.
  • Summarise long history. In a chat app, replace old turns with a short running summary instead of resending the whole transcript.
  • Watch formatting. Heavy markdown, deeply nested JSON and verbose code use more tokens than plain prose saying the same thing.
  • Cap the output.Ask for the length you actually need. “Answer in two sentences” is cheaper than an open-ended request.

Frequently asked questions

What is a token in AI?

A token is the basic unit a language model reads and writes. It is usually a short chunk of text — a common word, part of a longer word, a number, or a punctuation mark. Models never see letters or words directly; they convert everything into tokens first, then predict the next token one at a time.

How many tokens is a word?

For ordinary English, one token is about ¾ of a word, or roughly 4 characters. So 100 tokens is around 75 words, and 1,000 words is around 1,300–1,400 tokens. Short common words are often a single token; long or rare words, names, and code split into several.

Is this token counter exact?

For OpenAI models it is exact. This tool runs the real o200k byte-pair tokeniser — the same one GPT-4o, GPT-4.1 and the o-series use — directly in your browser, so the GPT token count matches what the API would charge. Anthropic's Claude and Google's Gemini use their own tokenisers, so their counts differ slightly, usually within a few percent for English prose.

Do GPT, Claude and Gemini count tokens the same way?

Not identically. Each uses its own tokeniser and vocabulary, so the same text can come out to slightly different token counts on each. The differences are usually small (a few percent) for English prose, but can be larger for code, emoji, or other languages.

Why do tokens matter?

Two reasons: cost and context. Most AI APIs bill per token, so token count is literally your bill. And every model has a context window — a maximum number of tokens it can consider at once — so token count decides whether your document, chat history or codebase fits.

Does the text I paste get sent anywhere?

No. This tool runs entirely in your browser. Your text is never uploaded to a server, logged, or stored — you can even use it offline once the page has loaded.

From the makers of these tools

Actually understand AI, one minute a day.

Scroll: Learn AI turns everything behind these tools into bite-sized lessons and quizzes. Free on iOS, Android coming soon.

Download on theApp Store
Coming soon toGoogle Play