Text tools
AI Token Counter: Count Tokens for GPT, Claude and Gemini
Paste a prompt or document to count its tokens as you type: exact counts for GPT-5, GPT-4.1, GPT-4o and GPT-4, plus estimates for Claude and Gemini, and how much of each model's context window it fills. Your text never leaves your device.
- GPT-5, GPT-4.1, GPT-4oAlso o1, o3 and o4-mini
- 0
- GPT-4, GPT-3.5 TurboAlso the text-embedding-3 models
- 0
- ClaudeEstimate
- 0
- GeminiEstimate
- 0
0 characters · 0 words
GPT counts are exact. Claude and Gemini counts are estimates. Your text never leaves your device.
How to use the AI Token Counter
- Paste or type your prompt, or open a text file.
- Read the token count for each model family as you type.
- Turn on "Show tokens" to see how the text is split into tokens.
Frequently asked questions
- What is a token?
- A token is a piece of text a language model reads as one unit: often a whole short word, part of a longer word, a space or a punctuation mark. In English, one token is about four characters or three quarters of a word.
- Are the GPT counts exact?
- Yes. GPT-5, GPT-4.1, GPT-4o and the o-series share one tokenizer, and GPT-4 and GPT-3.5 Turbo share another. Both are public, so the counts match what the model sees for your text. Chat messages add a few tokens each for formatting.
- Why are Claude and Gemini counts estimates?
- Anthropic and Google don't publish tokenizers that can run offline; they count tokens only through their own services. So the page estimates from a similar public tokenizer. Expect the real count to differ by roughly 10 to 20 percent, more for code or languages other than English.
- What is a context window?
- It's the most tokens a model can handle at once, counting your prompt and its reply. The bars show how much of each model's window your text would use.
- Why does the same text give different counts for different models?
- Each tokenizer has its own vocabulary. Newer ones have bigger vocabularies, so they usually need fewer tokens, especially for languages other than English and for emoji.
- Is my text sent anywhere?
- No. Counting happens on your device and your text never leaves it, so it's safe for private prompts and documents.
Related tools
- Word CounterPaste or type your text to count words, characters (with and without spaces), sentences and paragraphs as you type, plus an estimated reading time. What you type stays on your device.
- Character CounterCount characters with and without spaces as you type, and see how many you have left for X posts, text messages, meta descriptions, Instagram bios and other limits. What you type stays on your device.
- JSON FormatterPaste JSON to check that it's valid, then format it with clear indentation or minify it to one line. If something is wrong, you see the line and column of the mistake. Your data stays on your device.
- JSON VisualizerPaste or open a JSON file to explore it as a collapsible tree or as a graph of connected boxes. Search keys and values, copy the path to any field, and see exactly where invalid JSON breaks. Your JSON never leaves your device.