Token Counter
Count GPT, Qwen3, DeepSeek-V3 and Llama 3.2 text tokens locally, with rough estimates for Claude and Gemini.
Counts cover input text only, excluding chat templates, roles, tool definitions, images and API overhead. Tokenizers and usage may vary by model version.
Vocabulary sources and licenses
Uses the public vocabulary of the specific version listed, not every model in that family. The vocabulary loads from this site on first selection; input text is not uploaded. Automatic special-token insertion is disabled; handling of special markers in the input depends on the tokenizer.
Maximum 100,000 UTF-16 code units. Characters count Unicode code points; words use browser language segmentation (— if unavailable).
Token breakdown
Showing up to the first 400 tokens; the total includes all tokens. Each chip shows decoded text and its ID. A token may contain only part of a Unicode character and display �; this does not affect the count.
Tools run in your browser. Shared links may include your input; check the URL before sharing.
How to use
- Paste a prompt, code, or other text you want to count.
- 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 worldExample 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.