Offline LLM Token & Cost Counter

GPT-5 / Claude 4

Count LLM tokens offline with CJK-aware accuracy and compare context limits and input costs for GPT-5, Claude 4, and Gemini 2.5—zero uploads.

100% Client-Side — Verify 0 bytes uploaded in Network tabVerify 0 bytes sent in Network tab

or drop a text or data file here · Ctrl V to paste · or drop .txt, .md, .json, .toon, .jsonl · Ctrl V to paste
  • 0 bytes uploaded
  • CJK-aware token estimation
  • GPT-5, Claude 4 & Gemini 2.5

Instant Before & After Preview

Multi-model cost breakdown
Before (Input)prompt.txt
Summarize the quarterly revenue metrics below into 3 concise bullet points:
Q1 North America: $142,500 (+14% YoY)
Q2 Europe: $118,400 (+9% YoY)
Q3 Asia Pacific: $164,900 (+21% YoY)
After (Output).txt
GPT-5 (o200k): ~46 tokens ($0.000058)
Claude 4: ~50 tokens ($0.000150)
Gemini 2.5: ~48 tokens ($0.000060)

How it works

How to count LLM tokens safely without uploading prompts

Inspect prompt sizes, token segment highlights, and estimated API costs completely offline.

  1. Paste prompt or drop dataPaste any prompt, Markdown doc, JSON payload, or TOON file into the counter.
  2. Compare frontier modelsReview estimated tokens, % of context window used, and estimated USD cost per model.
  3. Shrink payloads with TOONIf JSON prompts look expensive, click Continue with JSON to TOON to cut tokens by 30%–60%.

FAQ

Frequently asked questions

Does LLM Token Counter account for Chinese, Japanese, and Korean text accurately?

Yes. Unlike naive English word counters (chars / 4), TxtTo scores CJK ideographs, Kana, Hangul, whitespace, and punctuation separately per model family.

Does counting tokens send my prompt to OpenAI, Anthropic, or Google?

Never. Everything runs offline in browser memory without downloading multi-megabyte BPE vocabularies or calling external APIs.

What does Highlight Token Segments visualize?

It renders alternating color-coded segments across your input text so you can spot token-heavy punctuation or code immediately.