How accurate is this token counter?
For GPT-4o, GPT-5, GPT-4, and GPT-3.5 Turbo, the counts are exact — this tool runs the real byte-pair-encoding tokenizer OpenAI itself uses (the gpt-tokenizer library, a faithful JS port of tiktoken), not an approximation. For Claude and Gemini, Anthropic and Google do not publish a client-side tokenizer, so this tool shows a clearly labeled character-based estimate (~4 characters per token) instead of pretending precision it does not have.
Why do GPT-4o and GPT-4 count tokens differently?
They use different encodings. GPT-4, GPT-4 Turbo, and GPT-3.5 Turbo all use cl100k_base. GPT-4o, GPT-4o mini, GPT-5, and the o1 reasoning models switched to o200k_base, a larger 200k-token vocabulary that tokenizes many strings (especially non-English text and code) more efficiently — fewer tokens for the same text.
Why does token count matter?
Every API call to a model like GPT-4o or Claude is billed per token, and every model has a fixed context-window limit measured in tokens, not characters or words. Knowing the real token count before you send a prompt lets you estimate cost accurately and avoid a request failing because it silently exceeded the context window.
Is a token the same as a word?
No. A token is a sub-word unit from the model's vocabulary — common short words are often one token, longer or rarer words split into two or more, and punctuation and whitespace can each be their own token. As a rough rule of thumb, 1,000 English tokens is roughly 750 words, but this varies a lot with the actual text — code, non-English text, and unusual formatting all tokenize differently than the average.
Is my text sent anywhere to count tokens?
No. Both the exact GPT tokenizer and the Claude/Gemini estimate run entirely in JavaScript in your browser. Nothing you paste here — including full prompts or system messages — is transmitted to OpenAI, Anthropic, Google, or our own servers.