Token Counter
Paste any text and instantly see how many tokens it consumes, counted with the exact OpenAI BPE tokenizers — cl100k_base for GPT-3.5/GPT-4 and o200k_base for GPT-4o/o1. See characters, words and bytes too, then check the count against a model’s context window with a live progress bar. Everything runs locally in your browser.
Frequently asked questions
Is the token count accurate?
Yes. It uses the exact Byte-Pair Encoding tokenizers OpenAI ships (cl100k_base and o200k_base), so the count matches the API billing exactly.
Are my texts uploaded anywhere?
No. Tokenization runs entirely in your browser; the text never leaves your device.
Related tools
LLM API Cost Calculator
Estimate any LLM API cost from token counts and your own per-1M-token prices.
Chat to OpenAI Messages
Convert a plain chat transcript into OpenAI messages JSON.
JSON Schema Generator
Generate JSON Schema draft-07 from a JSON sample for function calling.
LLM API Tester
Send a test request to any LLM API and get curl, Python, Node, Go and PowerShell code.