Token Counter
AI Token Counter
Count exact tokens for any AI model — instantly, free, in your browser.
OpenAI
| Model | Tokens | Context Window | Cost (Input) |
|---|---|---|---|
| GPT-4o | 0 | ✓ 128k | $0.00 |
| GPT-4o mini | 0 | ✓ 128k | $0.00 |
| GPT-4.1 | 0 | ✓ 128k | $0.00 |
| GPT-4.1 mini | 0 | ✓ 128k | $0.00 |
| GPT-4.1 nano | 0 | ✓ 128k | $0.00 |
| o3 | 0 | ✓ 200k | $0.00 |
| o4-mini | 0 | ✓ 128k | $0.00 |
| GPT-5.6 Sol | 0 | ✓ 256k | $0.00 |
| GPT-5.6 Terra | 0 | ✓ 256k | $0.00 |
| GPT-5.6 Luna | 0 | ✓ 256k | $0.00 |
Anthropic (estimated)
| Model | Tokens | Context Window | Cost (Input) |
|---|---|---|---|
| Claude Opus 4.8 | 0 | ✓ 200k | $0.00 |
| Claude Sonnet 4.6 | 0 | ✓ 200k | $0.00 |
| Claude Haiku 4.5 | 0 | ✓ 200k | $0.00 |
Google (estimated)
| Model | Tokens | Context Window | Cost (Input) |
|---|---|---|---|
| Gemini 2.5 Pro | 0 | ✓ 2000k | $0.00 |
| Gemini 2.5 Flash | 0 | ✓ 2000k | $0.00 |
| Gemini 3 Flash | 0 | ✓ 2000k | $0.00 |
Others (estimated)
| Model | Tokens | Context Window | Cost (Input) |
|---|---|---|---|
| Llama 4 | 0 | ✓ 128k | $0.00 |
| DeepSeek V3 | 0 | ✓ 128k | $0.00 |
| Mistral Large | 0 | ✓ 128k | $0.00 |
OpenAI models use exact tiktoken encoding. Other models show estimates based on comparable tokenizers.
Why tokens matter
Language models do not read text character by character. Instead, they process text in chunks called tokens. A token can be a single character, a whole word, or part of a word. The number of tokens a model has to process directly affects both the processing speed and the cost.
Uploading raw PDFs and Word documents to AI models is highly inefficient because it includes hidden metadata, formatting noise, and layout data that consumes tokens without adding value. Converting your files to Markdown first is the best way to optimize your context window.