The loopGiiS Designc0d3rConnectorsFree toolsPromptsPricingEnterpriseDocs
Sign InGet Started Free

AI Token Counter

Paste text to count tokens for GPT models (exact) and Claude or Gemini (estimate). Nothing leaves your browser.

0 characters · 0 words
GPT-4o family
0
OpenAI o200k tokenizer
GPT-4 / GPT-3.5
0
OpenAI cl100k tokenizer
Claude
≈ 0
Estimate: about 4 characters per token
Gemini
≈ 0
Estimate: about 4 characters per token

Why token counts matter

  • Cost. API pricing is per token, usually quoted per million input and output tokens.
  • Context limits. Every model has a maximum context window: your prompt, any files and the reply must fit inside it.
  • Speed. Longer prompts take longer to process, so trimming tokens makes replies faster.

How to reduce tokens

  • Remove repeated instructions and boilerplate from prompts.
  • Send only the part of a document the model needs, not the whole file.
  • Minify JSON and strip comments from code you paste in.
  • Ask for shorter answers when you don't need detail: output tokens usually cost more than input.

Frequently asked questions

What is a token?

AI models read text in small pieces called tokens. A token is often part of a word: in English, one token is roughly four characters or three quarters of a word. Models price usage and set limits in tokens.

Are the token counts exact?

For OpenAI models, yes: this page runs OpenAI's published tokenizers (o200k and cl100k) in your browser. Claude and Gemini use their own tokenizers, which are not published for local use, so their figures are a rough estimate (about four characters per token for English).

Is my text sent anywhere?

No. Tokens are counted in your browser, so your text never leaves your device.

How do I get an exact count for Claude or Gemini?

Use the provider's own counting endpoint: Anthropic's token counting API for Claude, or the countTokens method in Google's Gemini API.

Why do different models give different counts?

Each model family splits text with its own vocabulary. Newer tokenizers usually need fewer tokens for the same text, especially for code and non-English languages.

Related free tools

Word counter · JSON formatter · Diff checker · Base64 encoder