AI Token 计数器与分词器 · Token Counter & Tokenizer Visualizer

免费、无需注册的在线 Token 计数器与分词器可视化,支持 GPT-5.6、Claude、Gemini 3、Llama、DeepSeek-V4、GLM-5.2、Qwen3.5、Kimi-K3、MiniMax、MiMo 等 98 个模型(11 个家族)。输入文本即可实时获得 token 数、字符数、单词数,并以彩色分词块展示每个 token 及其 ID。

Free, browser-local token counter and tokenizer visualizer for 98 AI models across 11 families — GPT-5.6, Claude, Gemini, Llama, DeepSeek, GLM, Qwen, Mistral, Kimi K2–K3, MiniMax and MiMo. Shows token, character and word counts with a color-coded per-token breakdown and token IDs.

所有分词均在浏览器本地完成,文本不会上传到任何服务器。All tokenization runs locally in your browser — your text never leaves your device.

FAQ · 常见问题

Is my text uploaded to a server when I count tokens?

No. All tokenization runs entirely in your browser — OpenAI models use the bundled js-tiktoken library and other models use Hugging Face tokenizers executed in-browser via transformers.js. Your text never leaves your device and is not sent to any server.

Which AI models are supported?

98 models across 11 families: OpenAI GPT (GPT-5.6, GPT-5.5, GPT-5, GPT-4o, GPT-4 and GPT-OSS), Anthropic Claude (up to Claude Opus 4.8 and Claude Fable 5), Google Gemini (Gemini 3 Pro/Flash and 2.5), Meta Llama (Llama 3–4), DeepSeek (V3–V4, R1 and R1-Distill), GLM (4.5–5.2), Qwen (2.5–3.5, QwQ and Coder), Mistral, Kimi (K2–K3), MiniMax (M2–M2.7) and Xiaomi MiMo.

How accurate are the token counts compared to the official APIs?

Counts for OpenAI models are exact — they are computed with OpenAI's native tiktoken encodings (o200k_base and cl100k_base). For Claude, Llama, DeepSeek, Qwen and other open models, community tokenizers are used; they are reverse-engineered but quite accurate. For models whose tokenizers are unpublished (Claude 4.7+ and Gemini), the closest published tokenizer is used, so actual counts may be 0–35% higher.

How do I count tokens for a specific model?

Open the site, pick a model from the selector (grouped by vendor family), then paste or type your text. The token count updates automatically as you type, along with character and word counts, plus a colored breakdown where each block is one token and hovering shows its token ID.

Is the token counter free? Do I need an account or API key?

It is completely free and requires no account, no API key and no sign-up. Everything runs locally in your browser, so there are no usage limits or quotas.

Which languages does the interface support?

Ten languages: 中文 (Chinese), English, 日本語 (Japanese), 한국어 (Korean), Español, Français, Deutsch, Português, Русский (Russian) and العربية (Arabic, with right-to-left layout). The language is selected automatically from your browser settings, and a manual choice is remembered on your device.

What do the colored blocks in the token breakdown mean?

Each colored block represents a single token. Hovering a block shows that token's numeric ID, and ⎵ marks a space token. This makes it easy to see exactly how a model splits your text, including how Chinese, Japanese and Korean text is segmented.

Why is the first token count for some models slower?

Each model's tokenizer file is downloaded the first time it is used, and the download shows its progress. The default model's tokenizer is prefetched as soon as the page opens, and every other tokenizer is warmed in the background while the browser is idle, so switching models is usually instant. Downloaded tokenizers are cached by the browser, making later visits fast.