UtilHub

Token Counter

New

Instantly count tokens for your text across Claude, GPT-4o, Gemini, Llama, Mistral, and DeepSeek. See the exact API cost side-by-side for every model so you can pick the most cost-effective option.

0 chars0 words
ModelTokensPer requestDaily cost
Anthropicclaude-opus-4-6Latest
Anthropicclaude-sonnet-4-6
Anthropicclaude-haiku-4-5Fast
OpenAIgpt-4o
OpenAIgpt-4o-miniCheap
OpenAIgpt-4.1
Googlegemini-2.5-pro
Googlegemini-2.0-flashFast
Metallama-3.3-70b
Mistralmistral-large
DeepSeekdeepseek-v3Cheap

Token counts are estimated using a weighted word/character heuristic. Actual counts may vary slightly by tokenizer. Pricing as of early 2026 — verify with provider docs.

Frequently Asked Questions

How accurate are these token counts?

Token counts are estimated using a weighted blend of word count × 1.3 and character count ÷ 4, which closely approximates the cl100k_base tokenizer used by GPT-4 and Claude. For exact counts, use the official tiktoken library. Estimates are typically within 5–10% of the true count.

Why do token counts differ between models?

Different models use different tokenizers. GPT-4 uses cl100k_base, Llama uses SentencePiece, and Claude uses a similar BPE tokenizer. The same text can produce slightly different token counts across models, especially for non-English text, code, and special characters.

Does pricing include output tokens?

The 'per request' cost shown is for input tokens only. Output tokens typically cost 3–5× more per token. To estimate full cost, multiply your expected output token count by the output price and add it to the input cost.

Is my text sent to any server?

No. All token counting and cost calculation happens entirely in your browser using JavaScript. Your text is never sent to our servers or any third party.