Live Prompt & Document Token Counter
Paste your system prompt, markdown document, or source code below for real-time BPE token estimation and model cost projections.
Quick Size Estimator (PDF / Code / Words)
Completion Settings
Used to compute total cost for 1x, 1,000x, and 100,000x runs.
Tokenization Note
Token counts are estimated using an advanced BPE heuristic algorithm tuned for OpenAI tiktoken, Claude, and Gemini tokenizers. Actual counts may vary by Β±2β3% based on whitespace normalization and special tokens.
Execution Cost Projections for This Prompt
| Model | Provider | 1 Run Cost | 1,000 Runs Cost | 100,000 Runs Cost |
|---|
Frequently Asked Questions
How many words or lines of source code equal 1,000 tokens?
In English prose, 1,000 tokens equals roughly 750 words (~1.33 tokens per word). Source code is denser due to syntax symbols and indentation, averaging ~12 tokens per line, while structured JSON can require 20β35% more tokens than plain text.
Is any prompt text or proprietary code sent to a server?
No. All tokenization math and cost projections run 100% locally inside your browser. Nothing you type or paste is stored, logged, or transmitted over the network.
Why does context window percentage matter for cost?
Larger prompts approaching 128Kβ2M tokens scale input charges linearly per request and can trigger higher long-context pricing tiers on certain models. Monitoring prompt size helps keep RAG retrieval chunks tight and predictable.