AI text and prompts

Token Counter for LLMs

Count text tokens for OpenAI encodings, Qwen3-8B, and DeepSeek-V3.1. Compare Unicode code points and UTF-8 bytes, or estimate other models.

Text and encoding

Counting happens only in this browser. Your text stays on this page.

Token count

Enter text and choose an encoding to calculate.

How counting worksv1.1.0

Choose the actual encoding

Different model families split the same text differently. The examples in the menu map to published encodings. Check the exact model before using the result for an API request.

Count plain text

The selected tokenizer processes whitespace, punctuation, and code as entered. OpenAI encoding modes count typed special-token markers literally. The Qwen and DeepSeek modes preserve the pinned model tokenizers’ own marker rules. Unicode code points can differ from the visible character count for combined emoji or accents.

Estimate other tokenizers

For an unsupported tokenizer, enter an assumed average in UTF-8 bytes per token. The estimate varies with language, code, and the tokenizer. Use the provider’s counting endpoint for a model-specific request total.

Tokenization and API references