Prompt Token Counter

Estimate token counts for your AI prompts. Works with GPT-4, Claude, Llama, and all major models. Check context window usage and get character, word, and line statistics instantly.

Write your prompt here

Your prompt is never stored or transmitted through the internet.~0 tokens

Token count by model

19 models
Model# Tokens

GPT-5.5, GPT-5.4, GPT-5.4 mini

OpenAI1M ctx
0 tokens

GPT-5, GPT-5 Mini, GPT-5 Nano

OpenAI128K ctx
0 tokens

o4 Mini, o3, o3 Mini

OpenAI200K ctx
0 tokens

GPT-4.1, GPT-4.1 Mini, GPT-4.1 Nano

OpenAI1M ctx
0 tokens

Est. Tokens

0

Characters

0

No-space chars

0

Words

0

Lines

0

Sentences

0

Context window usage

0.0% used โ€” 0 of 128,000 tokens128,000 remaining

Token Visualization

Type or paste text above to see token visualization

Understanding Tokens

What is a token?

AI language models don't process text word by word โ€” they process it as tokens. A token is a chunk of text, usually 2โ€“6 characters for common English words. Short words like "the" or "is" are often one token; longer words like "tokenization" split into multiple tokens.

As a rule of thumb, 1 token โ‰ˆ 4 characters in English. 100 tokens โ‰ˆ 75 words. This is the heuristic used by this tool and documented by OpenAI.

Why do tokens matter?

  • 1. Cost: AI APIs charge per token. Knowing your count before calling saves money.
  • 2. Context limit: Every model has a maximum context window. Exceeding it causes API errors or truncated output.
  • 3. Response space: The window is shared between your prompt and the model's response โ€” large prompts leave less room for answers.

Context Window Reference

Window Max Tokens Example Models
8K 8,192 GPT-4, GPT-3.5 Turbo
128K 128,000 GPT-4o, GPT-5, Gemma 3, Llama 3.3
200K 200,000 Claude Haiku 4.5, Grok 3
1M 1,000,000 Claude Opus 4.8/4.7, Sonnet 4.6, GPT-4.1, Llama 4, Gemini 3 Flash
2M 2,000,000 Gemini 2.5 Pro/Flash, Gemini 3.1 Pro, Gemini 3.5 Flash

Pages at ~250 words/page ยท 1 token โ‰ˆ 0.75 words ยท limits may vary by model version.

Frequently Asked Questions

What is a token in AI models?
A token is a chunk of text that an AI language model processes as a single unit. Tokens are typically word fragments, not complete words. For example, "tokenization" is split into ["token", "ization"] โ€” two tokens. On average, one token equals roughly 4 characters in English text.
How accurate is this token counter?
This tool uses the ~4 characters per token approximation, which is the rule of thumb from OpenAI's documentation. For typical English prose it is accurate within 10โ€“20%. For code, JSON, or non-English text the actual token count can differ. For exact counts, use your AI provider's official tokenizer.
Why do token counts matter?
Token counts matter for two reasons: cost and context limits. AI API pricing is based on tokens (input + output). Most APIs also have a maximum context window โ€” if your prompt exceeds it, the API will return an error or truncate your input.
What is a context window?
The context window is the maximum number of tokens an AI model can process in a single API call. It includes your prompt plus the model's response. Exceeding the context window causes API errors or truncated output.
Is my text sent to any server?
No. All processing happens entirely in your browser using JavaScript. Your text never leaves your device. This tool has no backend and makes no network requests with your content.
How does token counting differ between GPT and Claude?
GPT models use the tiktoken tokenizer. Claude uses its own tokenizer. Both produce similar counts for English text, but can differ for special characters, code, and non-English languages. The 4-chars-per-token heuristic works as a rough estimate for all major models.