What is LLM Token Counter?
LLM Token Counter — An LLM token counter measures how many tokens — the subword units language models actually read and bill by — a piece of text becomes for a given model family.
Loading your tools...
Paste any text and see how many tokens it becomes for GPT-5, GPT-4o, Claude, Gemini, or Llama — with context-window fit at a glance.
LLM Token Counter: Pick a model, paste your text, and read the live count. GPT figures are exact (computed with OpenAI's published tokenizers); Claude and Gemini figures are labelled estimates because those tokenizers aren't public. Context-window bars show how much room your text uses.
Loading Tool...
LLM Token Counter — An LLM token counter measures how many tokens — the subword units language models actually read and bill by — a piece of text becomes for a given model family.
Choose the model family you're targeting.
Paste or type your text — the count updates live.
Read tokens, words, and characters side by side.
Check the context-window meters before sending long prompts.
Verify a prompt fits a model's context window before an API call
Estimate and compare API costs across providers
Trim system prompts and RAG chunks to a token budget
Debug why a request was truncated or rejected for length
Language models don’t read words or characters — they read tokens, subword chunks produced by byte-pair encoding. Common words are one token; rarer words split into several; spaces attach to the word that follows; emoji and non-Latin scripts can take multiple tokens each. That’s why the same 500-word email can be 600 tokens of plain prose or 900 tokens of dense code, and why counting beats any words-times-a-constant rule.
OpenAI publishes its tokenizer vocabularies, so GPT counts here are computed with the genuine article and match API billing for the text itself. Anthropic and Google don’t publish theirs, so no browser tool can count Claude or Gemini exactly — this one labels those figures as estimates (typically within ±15%) and the dedicated Claude and Gemini pages explain how to get exact numbers from each provider’s API.
Two practical things are denominated in tokens: cost, since API pricing is per million tokens in and out, and memory, since a model’s context window caps how much it can consider at once. In multi-turn chats the entire history is re-sent on every turn, so conversations grow quadratically in billed tokens — the counter makes that growth visible before your invoice does. For turning counts into dollars across providers, the AI API cost calculator picks up where this page leaves off.
Exact count using the o200k_base tokenizer these models actually use.