You paste a prompt into a web-based token counter and get a number back. Clean, fast, done. But between the paste and the result, your prompt, with its system instructions, API keys, proprietary logic, maybe even customer data, travels to a server you don’t control, where a third-party logging system stores it and un-audited code processes every variable. Most developers never think about this. They should. This post breaks down exactly what happens to your text when you use a conventional online token counter, why the privacy implications are worse than most people assume, and how to count tokens, estimate costs, and check context window fit across dozens of AI models. All without your prompt ever leaving your browser.
Where Your Prompt Actually Goes
Most web-based token counters work by sending your text to a server-side API. Your prompt is transmitted over HTTP, processed on someone else’s machine, and the token count is sent back. That’s the same architecture as the AI APIs you’re trying to estimate costs for. You’re sending sensitive data to a third party just to find out how much sending sensitive data to another third party will cost.
The privacy policy might say “we don’t store your data.” You have no way to verify that. Logs exist on every hop between you and the server: the hosting provider’s access logs, the CDN’s edge logs, any reverse proxy in front of the application. Even if the service genuinely deletes your prompt after processing, it existed in memory on a machine you don’t own, in a jurisdiction you may not know, subject to a privacy policy you probably didn’t read.
TLS encrypts the connection, but the server still sees your plaintext prompt. It has to, to count the tokens. And even “client-side” token counters that claim to run in your browser often use a simplified tokenizer that undercounts, giving you a false sense of security with inaccurate numbers. You think you’re at 80% of the context window. You’re actually at 95%.
Your Prompt Leaves the Browser
Every online token counter that gives you an instant, accurate result is either sending your text to a server or running a simplified approximation client-side that undercounts. Historically, developers believed accurate client-side tokenization was impossible without massive server-side libraries. Modern client-side architectures have bypassed this limitation by running model-specific vocabularies and BPE scripts directly in-browser via compiled WebAssembly, which is exactly how CapyToolkit avoids server dependencies entirely.
Server-side processing means your prompt exists in memory on a machine you don’t own. The server has to read every character to produce an accurate count. Before you hit “submit,” your browser has already leaked a surprising amount of information to the server, and that’s separate from the prompt text itself. See exactly what your browser leaks to every server you connect to. The fingerprint data alone can identify you across sessions, even without cookies. MDN defines fingerprinting as collecting and combining browser and operating-system features through JavaScript and CSS to create a unique browser fingerprint for tracking.1 MDN’s how browsers collect fingerprinting signals explains how JavaScript APIs collect enough signal to uniquely identify most visitors without any cookies at all.
What They Can See
System prompts often contain proprietary instructions, internal tool names, customer data schemas, API keys, database connection strings. Even “harmless” prompts reveal your tech stack, your architecture, your business logic, enough for a competitor to reverse-engineer your approach. RAG context pasted into a token counter might contain internal documentation, support tickets, or customer PII.
Scrub sensitive data before sending prompts to ChatGPT or any other AI provider. The PII Scrubber detects and tokenizes emails, API keys, IP addresses, and 19 other data types locally. Your real data never reaches the AI server. But the real solution is simpler: don’t send your prompt to a third-party token counter in the first place. Count locally, then paste into your IDE or API.
What the Token Counter Shows Before You Paste
Operating entirely within the local execution context of your browser tab, count tokens and compare AI model costs directly in your browser parses your prompt without ever transmitting a single byte across the network. It works offline with no network connection required: disconnect from the internet after loading the page and it still works. Paste once to see token counts and costs for every model in the grid at the same time, from GPT-5.6 Sol to Qwen3.5 397B, from Claude Opus 5 to Sonar Pro.
The context window column shows each model’s total window size alongside your usage percentage. Amber warning at 75%, red at 95%. Prices come from a public price dataset and are built into the page when the site is rebuilt, so the counter sends no request of any kind while you type. Your prompt content never leaves the tab. This is the workflow: count tokens, check context fit, compare costs, and only then paste into your IDE, chatbot, or API.
Compare AI model costs by token count before you commit to a provider. The difference between models isn’t just quality. It’s a 5x to 20x difference in cost for the same prompt.2
Context Window at a Glance
The context column displays each model’s total context window size next to your usage percentage. Context windows vary widely. Gemini 3.1 Pro Preview accepts 1M tokens.3 Grok 4 and Qwen3.5 397B stop near a quarter of that, as the table below shows. Before this update, you’d count tokens in the counter, then tab to the provider’s docs to check if you’re near the limit. Now it’s one screen.
This matters because a prompt that fits in GPT-5.6 Sol’s 1.05M window might blow past Qwen3.5 397B’s 262K limit, and you won’t know until the API returns an error or, worse, silently truncates. Understand what happens when your prompt exceeds the context window: the API accepts your request, the model generates a response, but your prompt was cut off and you get an answer to a question you didn’t fully ask. Silent truncation is the worst outcome because you don’t know it happened.
Research on context window overflow in production AI systems confirms that silent truncation causes agents to lose critical instructions mid-task, producing incorrect results that cost more tokens to diagnose and fix than the original task.4
Flagship Models, One View
To help you compare execution models side by side, the following matrix tracks input and output costs alongside context limits for the flagship models in the grid:5
| Model | Input $/M | Output $/M | Context Window |
|---|---|---|---|
| GPT-5.6 Sol | $5.00 | $30.00 | 1.05M |
| Claude Opus 5 | $5.00 | $25.00 | 1M |
| Gemini 3.1 Pro Preview | $2.00 | $12.00 | 1M |
| Kimi K3 | $3.00 | $15.00 | 1M |
| Grok 4 | $3.00 | $15.00 | 256K |
| Qwen3.5 397B | $0.60 | $3.60 | 262K |
| DeepSeek V4 Pro | $0.44 | $0.87 | 1M |
GPT-5.6 Sol carries the highest output cost in this table at $30/M with a $5/M input rate, and its 1.05M context window handles the longest prompts.6 Claude Opus 5 sits at $25/M output.5 Kimi K3 and Grok 4 meet in the middle at $3/M input and $15/M output, while DeepSeek V4 Pro and Qwen3.5 397B both cost under a dollar per million input tokens. The point isn’t to compare benchmarks. It’s to show that whatever model you’re using, you can estimate the cost of your specific prompt before you ever hit “send.”
Model Families Covered
The counter’s coverage spans fifteen distinct providers. Within the OpenAI family, the engine supports GPT-5.6 Sol, Terra and Luna, while Anthropic developers can audit Claude Fable 5, Opus 5, Sonnet 5 and Haiku 4.5. For Google’s ecosystem, the tool maps Gemini 3.1 Pro Preview, 3.6 Flash and 3.5 Flash-Lite, alongside Alibaba’s Qwen models from QwQ 32B up to Qwen3.5 397B. Moonshot brings Kimi K3 to the table, and Zhipu AI covers GLM-5 and GLM-5.2. DeepSeek’s V4 Pro and V4 Flash are fully represented, with xAI’s Grok 4, Grok 4.5 and Grok Code Fast rounding out the flagship lineup. MiniMax, Xiaomi (MiMo V2 Flash), Mistral, Amazon (Nova Premier, Pro), Nous Research (Hermes 4), Nvidia (Nemotron 70B, 3 Super 120B) and Perplexity (Sonar Pro) fill in the long tail. Because the list follows the public price dataset at each site build, a model drops out of the grid when the dataset stops listing it.
Every model in the grid updates at once. No need to check five different pricing pages or maintain a spreadsheet. Paste once, see everything. For teams evaluating model switches, this is the difference between a 10-minute research task and a 30-second glance.
The breadth matters more than it sounds. A prompt that costs $0.04 on GPT-5.6 Sol might cost $0.002 on DeepSeek V4 Pro, a 20x difference. If your workload is 10,000 requests per day, that’s the gap between $425 and $20 daily. The counter makes this visible before you commit to a provider, not after you’ve already built your pipeline around one.
That workflow keeps cost decisions and data handling inside CapyToolkit’s free browser-based tools that run locally, so teams can standardize before prompts reach production.
Before You Paste, A 30-Second Checklist
Follow this workflow before every API call that matters:
- Open the token counter. It works offline, no account, no install. It’s a static page.
- Paste your prompt. Every model updates instantly: exact counts for the GPT-5.6 rows and estimates marked with ~ for the rest.
- Check the context bar. Amber means you’re at 75% of that model’s window. Red means 95%.
- Compare input costs across models for your specific prompt length. The difference between GPT-5.6 Sol and a value model can be 20x or more.
- Estimate full round-trip cost:
input $ + (expected output tokens x output $/M). - Only now paste into your IDE, chatbot, or API, with full knowledge of cost and fit.
This takes 30 seconds. For teams, it’s the difference between a $50/month API bill and a $500 one. Knowing your prompt cost before you send it changes behavior. You start routing simple tasks to cheaper models, compressing prompts that are bloated, and catching context overflow before it becomes a production incident. Over time, this workflow also builds intuition: you start recognizing which prompts are too long, which models are overkill for a given task, and where the cost bottlenecks actually are. Analyze your API response logs locally afterward to verify you got what you paid for.
Cost Estimation in Practice, What Your Prompts Actually Cost
A real-world example: a 2,000-token system prompt with 500 tokens of user input, expecting 1,000 tokens of output. On GPT-5.6 Sol, that’s ($5/M x 2,500 / 1,000,000) + ($30/M x 1,000 / 1,000,000) = $0.0125 + $0.03 = $0.0425 per call. On DeepSeek V4 Pro, the same prompt costs ($0.44/M x 2,500 / 1,000,000) + ($0.87/M x 1,000 / 1,000,000) = $0.0011 + $0.00087 = $0.0020 per call. That’s roughly 20x cheaper for identical input and output.
Scale this to 1,000 calls per day. The difference between GPT-5.6 Sol and DeepSeek V4 Pro adds up fast: at $0.0425 per call on GPT-5.6 Sol versus $0.0020 on DeepSeek V4 Pro, that’s $42.50/day versus $2/day. Over a month, the gap exceeds $1,200. At 10,000 calls per day, you’re looking at $425/day on GPT-5.6 Sol versus $20/day on the value model, and the token counter shows you these numbers before the bill arrives, not after.
The math is straightforward, but most developers never do it. They pick a model, send prompts, and check the bill at the end of the month. By then, the overspend is already locked in. What changes the equation is seeing the per-call cost in real time, right next to the prompt you’re about to send. When you can see that your specific 3,000-token prompt costs $0.045 on one model and $0.002 on another, routing decisions become obvious.
Why Offline Matters More Than You Think
“But I only paste harmless prompts.” System prompts, RAG context, and few-shot examples contain your proprietary logic. Enterprise teams shipping to production can’t paste internal prompts into third-party web tools. It’s a data breach waiting to happen, and it likely violates their own security policy. OWASP’s LLM prompt injection guidance lists unauthorized data access and exfiltration, system prompt leakage, and sensitive information disclosure as key impacts of prompt injection attacks.7 OWASP’s how prompt injection exposes sensitive information lists sensitive information disclosure as one of the top risks in LLM applications, and that includes data exposed to intermediate services like token counters.
CapyToolkit’s architecture is a static HTML page. No backend. No database. No analytics on your input. The JavaScript runs in your browser and nowhere else. The live pricing data is fetched as a separate, anonymous request. Your prompt content is never part of it. This is the same zero-cloud architecture across all 50+ browser-based tools. The token counter isn’t an exception. It’s the standard. Every tool on the site, from PII scrubbers to log explorers, runs on the same principle: your data stays on your device.
If your threat model includes “don’t send my prompts to random servers,” and it should, then the choice of token counter matters as much as the choice of AI provider. Every prompt you paste into someone else’s web tool is a data transfer you can’t undo. The same zero-cloud principle that keeps your files local in CapyTools’ other 50+ tools applies here: your prompt is your data, and it should stay on your machine until you decide otherwise. Treating cost estimation and context validation as an offline-ready pre-flight habit turns security from a policy checklist into a natural developer reflex. By processing every prompt locally before it ever hits a network socket, you reclaim absolute ownership over your proprietary code and customer data, ensuring that your variables move only when you decide to send them, entirely on your terms.
- 1.
“Device fingerprint,” Wikipedia, accessed August 2026. https://en.wikipedia.org/wiki/Device_fingerprint
- 2.
Google, “Gemini API Pricing,” ai.google.dev, accessed June 2026. https://ai.google.dev/gemini-api/docs/pricing.md.txt
- 3.
Google, “Gemini 3.1 Pro Preview | Gemini API | Google AI for Developers,” ai.google.dev, April 2026. https://ai.google.dev/gemini-api/docs/models/gemini-3.1-pro-preview
- 4.
Anthropic, “Context windows,” platform.claude.com, accessed August 2026. https://platform.claude.com/docs/en/build-with-claude/context-windows
- 5.
Pydantic, “genai-prices: prices/data_slim.json,” github.com, accessed October 2026. https://github.com/pydantic/genai-prices/blob/main/prices/data_slim.json
- 6.
OpenAI, “GPT-5.6 Sol Model | OpenAI API,” developers.openai.com, accessed October 2026. https://developers.openai.com/api/docs/models/gpt-5.6-sol
- 7.
OWASP Foundation, “LLM Prompt Injection Prevention Cheat Sheet,” cheatsheetseries.owasp.org, accessed June 2026. https://cheatsheetseries.owasp.org/cheatsheets/LLM_Prompt_Injection_Prevention_Cheat_Sheet.html