Free browser tool

Token Counter

Estimate prompt size with a transparent rough heuristic: about four characters per token. Then compare the input plus output reserve against common context-window sizes.

Key facts

Token Counter

  • The estimate uses about four characters per token; exact tokenizers can differ materially.
  • The tool counts characters, words, estimated input tokens, and input plus reserved output tokens.
  • The fit table compares the plan against 8K, 16K, 32K, 64K, 128K, 200K, and 1M token windows.
  • All calculation happens locally in the browser; pasted text is not uploaded.

Text to estimate

Estimate only. Model-specific tokenizers treat punctuation, whitespace, code, and non-English text differently.

Estimate

Characters 0
Words 0
Tokens 0

Fits common context windows.

8K 0%
16K 0%
32K 0%
64K 0%
128K 0%
200K 0%
1M 0%

Planned total includes estimated input tokens plus the output reserve. The reserve is part of the same context window.

FAQ

How accurate is this token counter?

It is an estimate using the common rough heuristic of about four characters per token. Exact counts vary by tokenizer, language, whitespace, code, and model.

Does pasted text leave my browser?

No. The calculation runs entirely in client-side JavaScript on this page. There is no backend and no signup.

Why include an output reserve?

Input and output share the same context window. Reserving output tokens prevents a prompt plan from consuming the whole window before the model can answer.

When should I use an exact tokenizer instead?

Use an exact model-specific tokenizer before production billing, hard truncation, or benchmark runs. Use this page for fast planning and fit checks.