Token counter — tiktoken in your browser, the text never leaves it
Count tokens locally, without sending the text
Loading tool…
About this tool
Paste some text and see how many tokens it will actually cost. This is a practical question: APIs bill per token and context windows are measured in tokens, yet nobody can work out "how many tokens is a thousand Chinese characters" in their head. This runs the same BPE algorithm as OpenAI with the three official vocabularies (cl100k_base, o200k_base, p50k_base) — the implementation was checked token-by-token against js-tiktoken, so this is not an estimate. Beyond the number, it splits the text into tokens and colours each block, which makes the shape visible: one Chinese character is often one token while an English word may split into two or three. Everything is computed in the browser and the vocabulary is a one-off static download — the text itself goes nowhere, so draft contracts, internal documents and tender submissions are safe to measure before you decide to send them to a model.