Tool Categories

LLM Token Counter

Count tokens for GPT, Claude and Gemini prompts, see how much of the context window they use and what they cost

Paste any prompt to see how many tokens it uses, whether it fits the model's context window and what it costs to send. Exact for OpenAI's o200k_base models, estimated for Claude and Gemini.

100% in your browser - nothing uploaded

Your text

Prompt, document, code or chat transcript
0 characters
Exact tokenizer

Token count

GPT-5
Tokens (estimate)
~0
Loading tokenizer...
Characters
0
Words
0
Chars / token
-
Input cost
$0
$1.25 per 1M tokens
Context window400K tokens
0.00% used, 400,000 tokens left for more input and the reply.

Token breakdown

See exactly where o200k_base splits your text

Each coloured block is one token. Turn this on to see how your text is split.

Same text across every model

Token count, context usage and input cost. Prices checked 2026-10-12.
ModelTokensContext usedInput cost
GPT-6 AstraOpenAI~00.00%$0
GPT-6.1 SolOpenAI~00.00%$0
GPT-6 LunaOpenAI~00.00%$0
GPT-5.6 SolOpenAI~0-$0
GPT-5.6 TerraOpenAI~0-$0
GPT-5.6 LunaOpenAI~0-$0
GPT-5.5OpenAI~0-$0
GPT-5.4OpenAI~0-$0
GPT-5.4 miniOpenAI~0-$0
GPT-5.4 nanoOpenAI~0-$0
GPT-5OpenAI~00.00%$0
GPT-5 miniOpenAI~00.00%$0
GPT-5 nanoOpenAI~00.00%$0
GPT-4.1OpenAI~00.00%$0
GPT-4.1 miniOpenAI~00.00%$0
GPT-4oOpenAI~00.00%$0
GPT-4o miniOpenAI~00.00%$0
o3OpenAI~00.00%$0
o4-miniOpenAI~00.00%$0
Claude Fable 5.1Anthropic~00.00%$0
Claude Opus 5.5Anthropic~00.00%$0
Claude Opus 5Anthropic~00.00%$0
Claude Opus 4.8Anthropic~00.00%$0
Claude Sonnet 5.5Anthropic~00.00%$0
Claude Sonnet 4.6Anthropic~00.00%$0
Claude Haiku 5.5Anthropic~00.00%$0
Claude Haiku 4.5Anthropic~00.00%$0
Gemini 3.8 FlashGoogle~00.00%$0
Gemini 3.6 FlashGoogle~0-$0
Gemini 3.5 Flash-LiteGoogle~0-$0
Gemini 3.1 Pro PreviewGoogle~0-$0
Gemini 3.1 Flash-LiteGoogle~0-$0
Gemini 3 Flash PreviewGoogle~0-$0
Gemini 2.5 ProGoogle~00.00%$0
Gemini 2.5 FlashGoogle~00.00%$0
Gemini 2.5 Flash-LiteGoogle~00.00%$0

What is an LLM token counter?

An LLM token counter tells you how many tokens a piece of text becomes when a language model reads it. Models such as GPT, Claude and Gemini do not measure text in words or characters: they split it into tokens, charge per token, and limit each request to a fixed number of tokens called the context window.

Counting tokens before you send a prompt answers three practical questions: will this fit, how much room is left for the reply, and what will the request cost. This tool uses the real o200k_base tokenizer for OpenAI models and a clearly labelled estimate for models without a public tokenizer.

How to use the LLM Token Counter

  1. Paste or type your prompt, document or code into the text box.
  2. Choose the model you plan to send it to.
  3. Read the token count, the share of the context window it uses and the input cost.
  4. Open the model comparison table to see the same text counted and priced for every model.

Frequently asked questions

What is a token in an LLM?

A token is the unit of text a language model reads and writes. It is usually a word piece: common short words are one token, longer or rarer words are split into several. In English, one token is about 4 characters or roughly three quarters of a word.

How accurate is this token counter?

Counts for OpenAI models that use the o200k_base tokenizer (GPT-4o, GPT-4.1, the GPT-5 family, o3 and o4-mini) are exact for plain text. Claude and Gemini do not publish an offline tokenizer, so their counts are estimates scaled from the o200k_base count and can differ from the real number by 15% or more.

How many tokens is 1,000 words?

About 1,300 to 1,400 tokens for typical English prose with OpenAI models. Code, numbers, non-English text and unusual formatting use more tokens per word.

Does the token count include the model's reply?

No. This tool counts the text you paste, which is your input. The model's reply is billed separately as output tokens, and both input and output must fit inside the model's context window.

Is my text sent to a server?

No. Tokenization runs entirely in your browser using a downloaded vocabulary file. Your text is never uploaded or stored.

Why does a chat API report a few more tokens than this tool?

Chat APIs add a small number of formatting tokens for each message, plus tokens for system prompts and tool definitions. This tool counts only the raw text you paste.