Is there a Claude tokenizer I can use?
Anthropic does not publish its tokenizer as a public library. This playground's o200k counts are a close approximation for Claude; for exact pre-flight counts, Anthropic exposes a server-side count-tokens endpoint.
Which tokenizer does this use?
o200k_base — the vocabulary used by OpenAI's current GPT models. Counts are exact for GPT; Claude, Gemini, Grok, Kimi, and DeepSeek use their own unpublished tokenizers, so treat those counts as close estimates (typically within a few percent for English prose).
Does my text leave the browser?
No. The tokenizer is a static script downloaded once and runs entirely on your device — nothing is sent to any server.
Why do emoji and code use more tokens?
Tokenizers reward frequency. Emoji are multi-byte Unicode sequences, and code is full of rare identifiers and symbols, so they split into more pieces than common English words.