Skip to content
snowkitAI

Count GPT tokens, right in your browser

Paste a prompt and see its exact token count for OpenAI's current models, how much of each context window it uses, and an estimated cost.

Token counter

$

How the text splits into tokens

0tokens
0characters
0words
-estimated cost

Context windows

o200k is for GPT-4o, GPT-4.1, GPT-5 and o-series models; cl100k for GPT-4 and GPT-3.5. Claude, Gemini and Llama use their own tokenizers, so their counts will differ somewhat. Treat these as a close guide for them.

Paste a prompt, a document or code and see exactly how many tokens it uses, which context windows it fits, and roughly what it costs. Every count is worked out on this device. It is free, and your text never leaves it.

How to count tokens, step by step

  1. Choose the tokenizer: o200k or cl100k.
  2. Paste your text into the Text to count box.
  3. Read the number of tokens, characters and words, and see how the text splits into tokens.
  4. Enter a Price per million tokens to see the estimated cost.
  5. Check the Context windows to see how much room is left.

What a token is

AI models do not 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. Other models use their own tokenizers, so treat the counts as a close guide for them.

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.

Ways to use fewer tokens

  • Remove repeated instructions and long pleasantries.
  • Trim pasted documents to the parts that matter.
  • Remove extra spaces and blank lines. The text cleaner can help.
  • Split a very long document into parts with the chunker.
  • Keep reusable prompts short in your prompt library.

Who uses it

Developers sizing prompts and estimating costs, writers and students preparing long documents, and teams planning how much text fits in one request. For a wider cost estimate, try the cost estimator.

Privacy

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

Questions

How many words is a token?

In English, about three quarters of a word, or around four characters.

Why do code and other languages use more tokens?

Symbols, numbers and many non-English scripts split into more small pieces.

Is the cost exact?

It is an estimate based on the price you enter. Check current rates with your provider.

Where to next

Carry on with what you just made, still on your device.

More from Snowkit