Paste a prompt or a document to count its tokens for OpenAI's models, with an estimate for Claude. Each token is highlighted so you can see how the model splits your text, including why Amharic and code cost more than plain English.
Counted in your browser with the same tokenizers OpenAI's models use. A chat API call adds a few tokens per message for roles and formatting.
An API key in front-end code is readable by every visitor. Put the call behind a small backend instead: EthioDeploy runs a Node.js or Python API from GitHub with the key stored as an encrypted environment variable, on a free plan with no card.
A system prompt, a document for retrieval, or a whole chat. Counts update as you type.
GPT-4o and newer OpenAI models use o200k_base; GPT-4, GPT-3.5 and the text-embedding-3 models use cl100k_base. Both counts are exact.
Switch the highlight between tokenizers to see where words break. Hover a chunk to see how many tokens it took.
/v1/messages/count_tokens) with your prompt.Last updated
A token is the unit a language model reads and writes: a common word, part of a longer word, a punctuation mark or a few bytes of a rarer character. API pricing and context limits are both measured in tokens, not characters or words.
For ordinary English prose, about 1,300 tokens with OpenAI's current tokenizers. Code, JSON, numbers and non-Latin scripts use more tokens per word, so paste your actual text to get its real count.
GPT-4o, GPT-4.1, GPT-5 and the o-series reasoning models use o200k_base. GPT-4, GPT-3.5 Turbo and the text-embedding-3 models use the older cl100k_base. This page counts both exactly.
Tokenizers are built from the text they were trained on, which is mostly English and other Latin-script languages. Ge'ez characters appear rarely, so most are stored as two or three byte-level tokens instead of being merged into whole words. The page shows the characters-per-token ratio when it detects Ge'ez script.
No. The tokenizers load into your browser once and count locally, so prompts and documents never leave the page.
Read next: EthioDeploy's AI coding agent · Free backend hosting
EthioDeploy builds and runs your app on every push, with a database and HTTPS. Free plan, no card.
Deploy free