Count tokens with the o200k_base encoding, which the tiktoken library maps to OpenAI GPT-4o and GPT-4.1 models. Other OpenAI models may use a different encoding; check the model documentation if exact billing counts matter. Counting runs in your browser with js-tiktoken; text never leaves the page. Older encodings (p50k, cl100k) are not counted here. While the tokenizer worker loads, or if it fails, a character-based estimate is shown instead of the exact count.
How to use
- Paste text into the box. There is no file upload.
- Read the exact
o200k_basetoken count when the worker is ready, plus word and character counts and the quick estimate.
Related
How we check
The paste-only UI, o200k_base worker, and estimate fallback were checked against the island and existing tokenizer tests on 2026-11-11 (Asia/Colombo).