/tokens — Token Counter & Visualizer
Exact BPE tokenization with colored spans and token IDs, plus a cost estimator. Everything stays in your browser.
0
tokens (exact)
0
characters
0
words
0
chars / token
Token spans
Token IDs
These are OpenAI tiktoken vocabularies (
o200k_base, cl100k_base) — exact for GPT-style models. Claude, Gemini and Llama use different tokenizers, so treat the count as a close approximation for those.
0
≈ tokens
0
characters
0
words
0
lines
Token count is an estimate (blended ~4-chars-per-token and word-based heuristics; ±10–20%). Switch to the BPE Tokenizer tab for an exact count, then click "Use exact count in Cost Estimator".
char-based: 0 · word-based: 0
If this text is the input
If this text is the output