This page runs the official tokenizer.json of Qwen/Qwen3-8B (revision b968826, apache-2.0 license) in your browser with Hugging Face's tokenizers.js. Paste text above to see its token count, token ids and how the text is split.
Token counts for sample texts
| Text | Sample | Tokens |
|---|---|---|
| English | The quick brown fox jumps over the lazy dog. | 10 |
| Chinese | 你好,世界!今天天气很好。 | 8 |
| Code | def add(a, b): return a + b | 11 |
FAQ
Where does the Qwen3 tokenizer come from?
From the Hugging Face repository Qwen/Qwen3-8B, pinned to revision b968826d9c46dd6066d109eabc6255188de91218 and verified by SHA-256 at build time. The files are served from this site, not fetched from Hugging Face by your browser.
How do I count Qwen3 tokens in Python?
With Hugging Face's tokenizers library. This page's token ids were compared with its output on more than 1,000 sample texts:
from tokenizers import Tokenizer
tok = Tokenizer.from_pretrained("Qwen/Qwen3-8B")
print(len(tok.encode(text).ids))Is a chat template applied?
No. The text is tokenized exactly as pasted: no chat template is applied and no begin-of-text token is added for this model. A real chat request adds template tokens around your text.
Is my text sent to a server?
No. Tokenization runs in your browser and the text never leaves the page. For usage statistics the page only reports which tokenizer you pick and that you started typing, never the text itself.