Free · no signup · browser-local
Free BPE Token Counter: o200k_base and cl100k_base
Count text tokens locally with two explicit BPE vocabularies. Compare encoding results, inspect token IDs and download a report without uploading your text.
Local workspace · no model calls · inputs are not sent or saved
Prepare your text
Exact text encoding for the selected vocabulary. Chat wrappers, tool definitions, images, reasoning and actual API billing are outside this count. Special-token-looking strings are ordinary text.
Maximum 100,000 UTF-8 bytes. Files are read as text only; whitespace and an optional BOM are preserved.
Run again after editing. Calculations do not run on each keystroke.
Your output
agent-token-counter.jsonComplete the input to preview and export your result.
Getting started
Paste text or open a UTF-8 text file, select a vocabulary and click Count tokens. Copy or download the real JSON or TXT report.
Before you use the result
Text only, up to 100,000 UTF-8 bytes. Special-token-looking strings are literal text. Vocabulary counts do not predict chat framing, tool, image, reasoning or actual billed usage.
Try an example
Compare emoji, multilingual text and whitespace with both vocabularies, then inspect the complete ordered ID arrays.
How it works
gpt-tokenizer 4.1.0 loads the selected encoding on demand. Reports UTF-8 bytes, Unicode code points, UTF-16 units and whitespace-separated words without network submission or storage.
Frequently asked questions
Count exact o200k_base or cl100k_base text tokens locally, inspect token IDs and compare both vocabularies.
How do I use Token Counter & Vocabulary Comparison?
Paste text or open a UTF-8 text file, select a vocabulary and click Count tokens. Copy or download the real JSON or TXT report.
Does this tool upload my data?
Inputs and files are processed in your browser. Page-view analytics do not contain your tool input.
What should I check before using the result?
Text only, up to 100,000 UTF-8 bytes. Special-token-looking strings are literal text. Vocabulary counts do not predict chat framing, tool, image, reasoning or actual billed usage.