About this tool
A free tool for developers building with LLMs: count tokens using the real GPT-4o tokenizer, estimate API cost across providers, and check context-window usage — entirely offline, no text ever leaves your browser.
Frequently asked questions
How accurate is this token count for models other than GPT-4o?
It uses the exact o200k_base tokenizer that GPT-4o and newer OpenAI models actually use, so it's exact for those. Other model families (Claude, Gemini, Llama, etc.) use different tokenizers and will count somewhat differently — usually within a similar ballpark for English text, but treat cross-model numbers as an estimate, not exact.
Are the prices shown accurate?
No — treat them as illustrative, ballpark figures only. LLM API pricing changes frequently and this tool has no live connection to any provider's pricing page. Always check the provider's official, current pricing before making cost decisions for production use.
Does my pasted text get sent anywhere?
No. Tokenization happens entirely in your browser using a JavaScript library — no network request is made with your text, ever.