linlab.aiText to Vectors
Updated 14 Oct 2026 · 12 tokenizers measured in your browser

The same paragraph can cost nearly twice as many tokens on one model as on another. Measure it here, in your browser.

Live lab

Paste anything, count it everywhere

Pick the models to compare. Each tokenizer downloads once (size shown on the chip) and runs locally; your text never leaves the page. Click a row to see exactly where it cuts.

Add any model from OpenRouter or Hugging Face

Type an OpenRouter model (for example deepseek/deepseek-v4.1-flash) or a Hugging Face repo (for example Qwen/Qwen3.6-27B). OpenRouter tells us which Hugging Face repo backs each open model; the page then pulls that repo's tokenizer directly. Closed models such as Claude, Gemini and Grok have no public tokenizer to pull.

    Generations

    Does a vendor keep its tokenizer?

    Usually within a generation, often not across them. Each panel plots vocabulary size by release on the same scale (dashed lines at 100k and 200k). Labels come from comparing the old and new tokenizer files entry by entry, not from release notes.

    Unchanged Extended (old tokens keep their IDs) Replaced
    Training mix

    What tokenizers reveal about training data

    Loading…

    Efficiency

    English is a solved problem. Chinese and Japanese are not.

    Characters per token on five fixed passages of the same content (higher is cheaper). Each column is shaded against its own best, so the colour shows how far a model trails the leader on that kind of text. Every tokenizer handles English prose within 3% of every other; on Chinese the best is 1.97× the worst.

    Passages are 300–1,100 characters each, written for this page; open the lab's sample buttons to see them. GPT-4's older cl100k encoding is included as a reference row.
    Reference

    Every vendor's current tokenizer

    Vocabulary size is base entries plus special tokens, counted from the files themselves. "Public" means the tokenizer file can be downloaded, regardless of whether the model weights are open.

    VendorLatest modelTokenizerVocabularyPublicHow to count

    Counting tokens on closed models

    Anthropic, Google and xAI don't publish their tokenizers, and OpenAI hasn't published GPT-6's. Send the text to the official endpoint and it returns the count. Each needs that vendor's API key.

    Reading the numbers

    1. Counts cover the text only. Real requests add chat-template markers and system prompts, usually a few to a dozen tokens per message.
    2. Gemma and Gemini come from the same lab and Gemma 3's report says it uses Gemini 2.0's tokenizer. Using Gemma 4 for newer Gemini models is an approximation.
    3. Kimi ships its tokenizer in tiktoken format. This page re-implements it and was checked ID-for-ID against a Python reference.