Skip to content
kitty/bin
Your text never leaves this device

Count tokens for AI prompts, right in your browser

Paste a prompt, a document or code and see exactly how many tokens it uses with OpenAI's tokenizers, which context windows it fits, and roughly what it costs. Every count is worked out on this device.

0tokens
0characters
0words
-estimated cost

Context windows

How the text splits into tokens

Tokenizer
$

Enter the input price from your provider's pricing page to estimate the cost of this text.

Claude, Gemini and Llama use their own tokenizers, so their counts will differ somewhat. Treat these as a close guide for them.

What a token is

AI models don't read letters or words. They read tokens, which are common pieces of words. In English a token is about four characters, or three quarters of a word, but code, numbers and other languages split differently. Models charge and limit by tokens, so knowing the count tells you whether a prompt fits and what it costs.

Exact counts for OpenAI models

This counter uses the same tokenizers as OpenAI's models: o200k for GPT-4o, GPT-4.1, GPT-5 and the o-series, and cl100k for GPT-4 and GPT-3.5. Chat messages add a few tokens of formatting per message on top of these counts.

Context windows

The bars show how much of common context window sizes your text uses. Leave room for the model's answer: a prompt that fills the whole window leaves no space to reply.

Privacy

The tokenizer is downloaded to your browser and runs here. Your text is never uploaded.

more in the bin

Keep going.

More AI tools

Explore the bin