Token Counter

Count GPT, Qwen3, DeepSeek-V3 and Llama 3.2 text tokens locally, with rough estimates for Claude and Gemini.

Tools run in your browser. Shared links may include your input; check the URL before sharing.

How to use

  1. Paste a prompt, code, or other text you want to count.
  2. Select the matching model or tokenizer and read the token total. Options marked as estimates give approximate counts.

This example illustrates one supported operation. Choose the matching mode and settings above; generated values and formatting may vary.

Example input or settings

Hello world

Example result

o200k_base: 2 tokens
[13225, 2375]

Why does the count differ from API usage?

This tool counts only the text you paste. The API may also count system prompts, message history, tool definitions, and generated output. Use the usage figures returned by the API for exact counts.

Why can the same text have different token counts?

Tokenizers split text differently. Chinese characters, code, and punctuation can all affect the result. Compare two tokenizers using the same text, then use the count for your target model.