Count tokens for GPT, Claude, Gemini and estimate API costs. Powered by CapabilityBase Runtime.
Tokens are the basic units that large language models (LLMs) like GPT, Claude, and Gemini use to process text. A token can be as short as one character or as long as one word. On average, 100 tokens equal roughly 75 words. Both API pricing and context window limits are measured in tokens, so counting them before sending a request helps you control costs and avoid truncation.
Prices shown are per 1,000 input tokens (as of mid-2026). Actual API costs may vary and should be verified on each provider's official pricing page.
For GPT models using tiktoken, it's 100% accurate - the exact same algorithm OpenAI uses. For Claude and Gemini, it's an estimate based on character ratio, typically within 5-10% of actual.
No. All tokenization and counting runs entirely in your browser using JavaScript and WebAssembly. Nothing leaves your device.
Roughly 0.75 words per token for English text, or about 4 characters per token. This varies by language and content type.
The tokenizer closely approximates OpenAI’s tiktoken algorithm (BPE rules) and is calibrated per model family. For GPT-class models expect results within a fraction of a percent of tiktoken.
Yes. Paste your prompt, pick the model (GPT-4o, Claude, Gemini, DeepSeek...), and get input/output token counts plus estimated cost instantly — no API key needed.
Completely. Tokenization runs in your browser with no network requests, so you can count tokens even with sensitive prompts.
Yes — tokens, words, characters (with and without spaces), lines, and reading time are all reported in one pass.
Deploy this tool on Vercel · Ship faster with Cursor · Your static site on Cloudflare