AI ToolsTools & Guides

Prompt Token Counter — See Exactly What GPT-4o and Claude Will Charge You

Live token counts, pricing estimates, and context remaining for GPT-4o, GPT-4, GPT-3.5, GPT-4o mini, Claude, and Gemini

No signup • Runs in browser • Free

Open the Token Counter →

LLM prompts balloon quickly, especially when you paste log files, code snippets, or whole PR descriptions. Copy/pasting into a playground just to see a token count wastes time and leaks sensitive text. The Prompt Token Counter keeps everything client-side with js-tiktoken so your prompt never leaves the browser.


Tokenisers covered

| Model | Encoding | Context window | Pricing baseline | | --- | --- | --- | --- | | GPT-4o | cl100k_base | 128K tokens | $0.005 / 1K input tokens | | GPT-4 | cl100k_base | 8,192 tokens | $0.03 / 1K tokens | | GPT-3.5 Turbo | cl100k_base | 16K tokens | $0.001 / 1K tokens | | GPT-4o mini | o200k_base | 200K tokens | $0.0005 / 1K tokens | | Claude (approx) | cl100k_base proxy | 200K tokens | $0.003 / 1K tokens | | Gemini (approx) | cl100k_base proxy | 1M tokens | $0.0035 / 1K tokens |

Claude and Gemini use cl100k-based proxies so you still get a realistic token ballpark while Anthropic and Google keep their official BPEs closed.


What you see while typing

  • Token, character, and word counts update every 100 ms as you edit.
  • Estimated spend per model uses current public pricing with a quick link to the vendor's pricing page.
  • Context remaining + progress bar shows whether you're safe, approaching the 75% warning zone (amber), or bursting the limit (red).
  • Split into chunks proposes how many segments you need at ~80% fill if you exceed a model's window.
  • Copy token count instantly copies a model's token total for commit messages, PR templates, or Slack updates.

Everything runs in the browser via WASM — no telemetry, no external API calls, and no prompt leakage.


Workflow ideas

  1. Preflight every long-form prompt. Paste the doc, note the cheapest model that still fits, and flag any wrap-around chunking before handing it to your team.
  2. Budget multi-model flows. Compare GPT-4o and GPT-4o mini pricing in the same view to decide which step of your pipeline can downshift.
  3. Keep CI chatbots on budget. Combine the Token Counter with the Diff Checker so that your PR bot can point to exact token costs when reviewers complain.
  4. Share links with state. The tool URL encodes the textarea content, so you can paste a link in Slack and everyone opens the same tokenizer snapshot instantly.

Need to double-check a mega prompt right now? Open the Prompt Token Counter, paste your text, and keep those GPT invoices predictable.

Related Articles

Helpful tools for AI Tools

Also read: