Free Token Counter for AI Prompts
Count text tokens locally with o200k_base or cl100k_base, estimate Claude and Gemini tokens, and calculate input cost using your own price.
Check a prompt before sending it to an API. Compare tokenizer counts, inspect text length, and estimate input spend without uploading your text.
Up to 50,000 UTF-16 units per count (some emoji use two units).
Runs in your browser. Your text is not uploaded.
Exact text tokens for the selected encoding
Estimated input cost
—
Based on your entered price and this text only. No model price is implied.
Counts cover the pasted text only. Chat wrappers, tools, images, output and provider billing can add tokens. Claude and Gemini estimates are approximate; check the provider usage response for actual billed tokens.
How it works
- Paste text, code, or JSON into the counter.
- Choose a tokenizer. Use the clearly labeled estimates only for rough Claude or Gemini planning.
- Enter your input price per million tokens to estimate the cost of the pasted text.
Questions & answers
Is this the exact number I will be billed?
The o200k_base and cl100k_base options count text with those encodings. Billing depends on the actual model and full request, including messages, tools and media. Claude and Gemini options are rough estimates, not their official tokenizers.
Does counting tokens use an API or upload my text?
No. The tokenizer runs locally in your browser. Counting is free and does not consume API credits.
Choose the right API for your budget
Compare live model prices, create an account and get an API key. Check the actual usage returned by your selected model when estimating production costs.
More free AI tools
Turn a reference image into a detailed, editable AI prompt. Describe composition, lighting, textures and style for GPT Image, Flux or other image models.
Free AI Video Prompt GeneratorTurn an idea or reference image into a video prompt with subject motion, camera movement, pacing and shot timing for Seedance, Kling, Wan or Veo.
Free Seedance Prompt GeneratorWrite Seedance video prompts with shot timing, camera direction, subject motion and reference-image continuity. Plan a clip before spending generation credits.
