ailearnist Loading…
AI Foundations Playgrounds · Beginner

Token Counter

Paste a prompt or document and see its token count and how much of each context window it fills.

Instant token estimate 6 context windows Runs in your browser

Your text

Paste a prompt, a document or a chat history. Everything stays in your browser.

Try:

Token estimate

0≈ tokens
0words
0characters
–chars per token

Context window fill (text + reply reserve)

Estimate based on how BPE tokenizers typically split English, code and other scripts (~4 characters per token for English). Exact counts vary by model.

Why token counts matter

  • Cost: APIs bill per input and output token, so a 2,000-token system prompt is paid on every single call.
  • Limits: the context window holds the prompt and the reply. Leave room for the answer or it gets cut off.
  • Languages differ: non-English scripts, emoji and code usually need more tokens per character than plain English.
  • Want to see the split? Open the Tokenizer Playground to see each token, or size your bill in the LLM Cost Estimator.