Paste or type your prompt
Use the editor above. It supports single-prompt mode or multi-turn conversation mode for testing chat flows. Variables like {{name}} get resolved before counting.
Count tokens and calculate costs for GPT-4o, Claude, Gemini, Grok, DeepSeek and 25+ more AI models. Optimize your prompts, compare pricing, and ship — tokenization runs 100% in your browser, so your prompt content never touches our servers.
Three steps from raw text to a precise cost estimate for any major AI model.
Use the editor above. It supports single-prompt mode or multi-turn conversation mode for testing chat flows. Variables like {{name}} get resolved before counting.
Choose from 30 models. For GPT-4o, GPT-4.1, o3 and o4-mini we run the exact tiktoken library (WebAssembly) locally — byte-perfect token counts. For Claude, Gemini, Grok, and DeepSeek we apply close approximations.
Input cost × rate + estimated output × rate. Adjust the input/output ratio slider to match your real usage. Export to curl, Python, or Node.js for direct API integration.
Measure, build, optimize, and ship — all in your browser.
Same tiktoken tokenizer as OpenAI, running via WebAssembly. Exact for GPT, smart approximation for others.
Side-by-side pricing for 30 models across OpenAI, Anthropic, Google, xAI, DeepSeek, Mistral, and Meta.
Visual breakdown of how much context window your prompt and expected output will use. Warnings before you overflow.
Compose prompts step by step — task, tone, format, techniques (CoT, few-shot, XML tags, rubrics). Live token preview.
11 professional prompt templates: system prompts, chain-of-thought, few-shot, code review, summarization.
Build multi-step pipelines. Each step has its own model and output variable. See cumulative tokens and cost.
Auto-detect verbose phrases, filler words, and repetitions. One-click fix with undo. See tokens saved instantly.
Paste a real prompt plus response to measure your output ratio. Get specific advice to reduce it.
Use {{variable}} placeholders. Fill values in a side panel, tokens count the resolved prompt.
Copy your prompt as a ready-to-paste curl, Python (openai/anthropic SDK), or Node.js snippet.
Save prompt versions, then A/B compare any two. See token diff, cost diff, and line-by-line changes.
Share prompts via URL. Save snippets for reuse. Session metrics track your tokens, costs, and model usage over time.
Practical guides on token counting, prompt engineering, and AI model pricing — written for developers.
Tokens drive cost, speed, and context limits for every AI API. A complete primer for developers — how tokenizers work, why counts differ per model, and how to estimate before you call.
Read guideThe techniques that actually move the needle: role assignment, XML tags, chain-of-thought, few-shot examples. With examples from real production prompts.
Read guideSide-by-side pricing across GPT-4o, Claude, Gemini, Grok, and DeepSeek. What you actually pay per 1M tokens, which models are cheapest for long contexts, and where the hidden costs hide.
Read guideA token is a chunk of text that an AI model processes as one unit — not exactly a word, closer to a common syllable or subword. GPT-4o, Claude, and Gemini tokenize text differently, which is why the same sentence can have different token counts across models.
For OpenAI models (GPT-4o, GPT-4.1, o3, o4-mini), we use the official tiktoken library running as WebAssembly in your browser — the exact tokenizer OpenAI uses. For other models (Claude, Gemini, Grok, DeepSeek) we apply an approximation close to their tokenizers' behavior.
No. Everything runs in your browser — tokenization, cost calculation, optimization, and storage. Nothing leaves your device. Check the Network tab in your browser's devtools to verify.
30 models across 7 providers: Anthropic, DeepSeek, Google, Meta, Mistral, OpenAI, xAI. Includes the latest GPT-5, GPT-5.4, Claude Sonnet 4.6, Claude Opus 4.7, Gemini 3.1 Pro, Grok 4.20, and more.
Input costs are exact (based on token count × provider's listed input price per million tokens). Total cost includes a configurable output-token multiplier (default 3×) — adjust the slider to match your real input/output ratio for realistic totals.
Yes. Free, no signup, no API key needed. Your prompts never leave your browser. There is no paid tier.
Yes. Open the sidebar's cost comparison table to see your exact prompt priced across all 30 supported models side-by-side — including input, output, and total estimated cost.
A separate section where we analyze leaked system prompts from 30+ AI tools like Cursor, Claude Code, v0, Windsurf, and ChatGPT. Each page shows the exact prompt, token count, cost, and which prompt engineering techniques are used.