LLM Token Counter
Paste text to see estimated token counts for Claude, GPT, and Gemini side by side. GPT tokens are counted exactly with the o200k_base tokenizer; Claude and Gemini do not publish their tokenizers, so those counts are approximations.
Everything runs locally in your browser — your text is never sent to any server.
Loading tokenizer dictionary…
Claude
approx.0
tokens
Estimate (Anthropic does not publish a tokenizer for Claude 3+)
GPT
exact0
tokens
o200k_base — GPT-5.5 / GPT-5 / GPT-4o / GPT-4.1
Gemini
approx.0
tokens
Estimate (Google does not publish a client-side tokenizer)
Per-model breakdown
| Model | Tokens | Context limit | Usage |
|---|---|---|---|
| Claude Opus 4.8 approx. | 0 | 200K | 0% |
| Claude Sonnet 4.5 approx. | 0 | 200K | 0% |
| Claude Haiku 4.5 approx. | 0 | 200K | 0% |
| GPT-5.5 | 0 | 1.05M | 0% |
| GPT-5 | 0 | 400K | 0% |
| GPT-4.1 | 0 | 1M | 0% |
| GPT-4o | 0 | 128K | 0% |
| GPT-4 Turbo | 0 | 128K | 0% |
| GPT-3.5 Turbo | 0 | 16K | 0% |
| Gemini 3 Pro approx. | 0 | 1M | 0% |
| Gemini 2.5 Flash approx. | 0 | 1M | 0% |
Claude and Gemini counts are heuristic estimates derived from the exact GPT count and the character mix, and may differ from the real API count by roughly ±10–20%. Use them for rough sizing, not billing.
The tokenizer dictionary could not be loaded, so the GPT count is also an approximation.
Recent Articles
Use a SQL formatter before review to make queries easier to read
A practical workflow for formatting long SQL queries so JOIN, WHERE, GROUP BY, and ORDER BY clauses are easier to review.
Visualize GitHub Actions needs dependencies with Mermaid
A practical workflow for reading complex GitHub Actions workflow YAML by separating job dependencies from step details.
Common pitfalls when drawing infrastructure diagrams with Mermaid
A practical guide to organizing node names, arrows, and diagram scope when building infrastructure diagrams with Mermaid in the browser.
Generate Mermaid ER diagrams from SQL DDL to review table relationships
A practical workflow for turning CREATE TABLE statements into Mermaid ER diagrams and checking foreign keys before a schema review.
Design notes for building JOIN queries with a Visual SQL Builder
A practical workflow for using a Visual SQL Builder to assemble SELECT, JOIN, and WHERE clauses without losing track of table relationships.
Convert CSV and JSON to check data faster
A practical workflow for moving between CSV exports, API responses, and spreadsheet-style review without losing track of fields.