LOADING
PLEASE WAIT...
LOADING
PLEASE WAIT...
Count tokens for GPT-4, GPT-4o, Claude and Gemini. See character and word counts, estimated API cost and how much of the model's context window your text uses.
Large language models like ChatGPT (GPT-4 / GPT-4o), Claude and Gemini do not read text as whole words. They split your input into small pieces called tokens. A token can be a short word, part of a longer word, a number, a punctuation mark or even a space. Models charge you and enforce context limits in tokens — not in words or characters.
Exact tokenizers (OpenAI's tiktoken, Anthropic's tokenizer, Google's SentencePiece) are model-specific. For a fast, private, in-browser estimate this tool uses a proven character-based heuristic, then applies a small multiplier per model family:
Counts are typically within about 10% of the official tokenizer — accurate enough to plan prompts and budget API spend before you hit send.
These windows change as providers ship new models. Always leave room for the reply — a 10,000-token answer needs 10,000 free tokens on top of your prompt.
All counting happens instantly in your browser. Your text is never sent to any server and never stored. Safe for confidential prompts, source code and business documents.
It uses a character-based estimate with a small per-model multiplier. For English text the result is typically within about 10% of the official tokenizer (tiktoken for GPT, Anthropic's tokenizer for Claude). That is accurate enough to plan prompts and estimate cost. For billing-critical work, confirm with the provider's official tokenizer.
Characters are individual letters and symbols. Words are groups of characters separated by spaces. Tokens are the chunks the model actually reads — often a short word, part of a longer word, or a punctuation mark. As a rule of thumb, 75 English words ≈ 100 tokens ≈ 400 characters.
No. This tool counts the text you paste — your prompt / input. The model's reply (output tokens) is billed separately and is unknown until the model finishes. Leave spare room in the context window for the answer you expect.
Each lab uses its own tokenizer. The same sentence can become a slightly different number of tokens on GPT-4o, Claude or Gemini. This tool applies a small family-specific factor so you can compare models before you pick one.
Estimated cost = (tokens / 1,000,000) × the model's published input price per million tokens. Prices are indicative list prices for API input and can change. Output tokens (the reply) are not included. Use the AI Cost Calculator for monthly projections.
Yes. Everything runs locally in your browser with JavaScript. Nothing is uploaded, logged or stored. Safe for confidential prompts and source code.