AI Token Counter

How many tokens is your text really using, and what will it cost? Paste any text below and find out in seconds, free, without sending anything anywhere.


Counts use the exact tokenizer for the selected OpenAI model family. Claude and Gemini use different tokenizers, so for those models this count is only an approximation.





0
Tokens
0
Words
0
Characters
$0.00
Input cost

Sentences (approx.): 0 | Paragraphs: 0

Context window usage

Everything runs in your browser. Your text is never uploaded or stored.

What is an AI token counter?

An AI token counter tells you how many tokens a piece of text becomes when an AI model reads it. Models do not read words or characters. They read tokens, and providers bill and limit usage by tokens, so counting them before you send a prompt helps you stay inside a context window and estimate cost.

This tool counts tokens, not words. It also shows words, characters, sentences and paragraphs so you can see how they relate, but the number that matters for AI usage is the token count.

How to count tokens in your text

  1. Pick the model you plan to use from the list.
  2. Paste your text, type it, drop in a .txt file, or use the sample text.
  3. Read the token count, the input cost and how much of the context window your text fills.
  4. Press Copy results to keep the numbers.

The first count downloads the tokenizer for your chosen model. After that, counting happens instantly in your browser. Newlines, tabs and repeated spaces are counted exactly as the tokenizer sees them, so nothing is trimmed or cleaned first.

How to Count Tokens in Text: A Real Example

Counting tokens is simple: pick the model you will actually use, paste your text into the counter above, and read the number. The number matters because it is what the model sees and what you are billed for — it decides whether your prompt fits inside the model’s context window and what it will cost to send. The example below shows exactly what that looks like on a real paragraph.

We counted the first paragraph of our own homepage’s main body copy — “Build, orchestrate and audit AI agents on your own infrastructure, with human approvals and a record of every action. Run it self-hosted, in your private cloud or fully air-gapped.” — with this tool on 4 December 2026, using the default model, GPT-5 (o200k_base). The result: 39 tokens for 29 words and 180 characters. At GPT-5’s listed input price of $1.25 per 1M tokens, that paragraph would cost $0.0000 to send, and it fills less than 0.01% of GPT-5’s 400,000-token context window.

Notice that 29 words became 39 tokens — about a third more tokens than words. That is normal: a token is roughly three-quarters of a word in English, and long words split into pieces (“infrastructure” counts as one token here, but “orchestrate” splits into two, and “self-hosted” and “air-gapped” each split as well). Word count alone would have told you 29; only the token count tells you what the model actually reads. Paste your own prompt above and check it before you send it — especially the long ones, where the gap between words and tokens is where context windows get eaten.

Token counts and input cost by model

The table prices your text at each listed model’s input rate. Output tokens are billed separately and are not included here.

Model Tokenizer Input price per 1M tokens Context window Input cost for your text
GPT-5 o200k_base $1.25 400,000 –
GPT-4.1 o200k_base $2.00 1,047,576 –
GPT-4o o200k_base $2.50 128,000 –

These prices are for models that use the o200k_base tokenizer. Select GPT-5, GPT-4.1 or GPT-4o above to see the cost comparison for your text.

Prices last updated: 22 November 2026. Source: OpenAI API pricing (Standard processing, input tokens) and OpenAI model documentation for context windows. Prices change, so check the source before you budget. Models without a verified price, window or tokenizer match are left out rather than guessed.

Why token counts differ between models

Each model family uses its own tokenizer, so the same text splits into a different number of tokens. This page uses the open-source js-tiktoken library, which reproduces OpenAI’s tokenizers in the browser. Claude and Gemini use different tokenizers, so treat any count here as an approximation for those models.

Language and content matter too. Chinese, Japanese and Korean text, and emoji, use more tokens per character than plain English. Code and unusual spacing can also change the count.

AI token counter FAQ

What is a token?

A token is a chunk of text, roughly 4 characters or about three quarters of a word in English. Models read and charge by tokens, not by words.

How many tokens is 1,000 words?

Roughly 1,300 tokens for ordinary English, based on OpenAI’s own rule of thumb of about 750 words per 1,000 tokens. It varies with the text, and code, other languages and emoji use more.

Why does the count change when I switch models?

Each model family uses a different tokenizer, so the same text splits into a different number of tokens. Pick the family you actually use.

Is my text sent to a server?

No. Counting runs entirely in your browser with the tokenizer library. Nothing is uploaded or stored.

Why is this different from a word counter?

A word counter counts words. This tool counts tokens, the unit AI models actually use and charge for.

Count first, then plan your prompts

Knowing your token count lets you keep prompts inside a context window and estimate input cost before you spend anything. Count your text above, then use the related tools below to price it and improve it.

Which prompt will you count first?