Free token counter

Token counter for OpenAI models

This free token counter counts the tokens and characters in any text for OpenAI's GPT-5.6, GPT-5, GPT-4.1, GPT-4o and o3 models, using the o200k_base tokenizer, with no signup. It runs in your browser, so your text is never uploaded.

English text averages about 4 characters per token, so 1,000 tokens is roughly 750 words. At $2.00 per 1M input tokens, sending those 1,000 tokens to gpt-5.6-terra costs $0.002.

Tokens
0
Characters
0
Characters per token
-

Your text stays in this browser. It is never uploaded.

Input cost of this text

  • gpt-5.6-sol$4.00 per 1M input tokens$0$0 per 1,000 requests
  • gpt-5.6-terra$2.00 per 1M input tokens$0$0 per 1,000 requests
  • gpt-5.6-luna$0.20 per 1M input tokens$0$0 per 1,000 requests

Uncached input at standard rates, checked 9 Nov 2026 on OpenAI's pricing page. Output is billed on top.

Counts use o200k_base, the tokenizer OpenAI's tiktoken maps to GPT-5.6, GPT-5, GPT-4.1, GPT-4o and o3. GPT-6 models are not covered yet.

Claude and Gemini split text differently. Count them with Anthropic's token counting or Google's countTokens.

How the counter works

The counter uses gpt-tokenizer, an MIT-licensed port of OpenAI's tiktoken, with the o200k_base vocabulary of about 200,000 tokens. It loads only when you start using the text box, and it runs in a background worker, so a long paste does not freeze the page.

On our test texts its counts match tiktoken 0.14.0, OpenAI's own Python library. Special markers such as <|endoftext|> are counted as plain text. The character count includes spaces and line breaks.

Which OpenAI models use which tokenizer

OpenAI's tiktoken library maps each model name to a tokenizer. On 9 Nov 2026 every GPT-5 model maps to o200k_base, and so do GPT-4.1, GPT-4o and the o-series.

ModelsTokenizerCounted here
GPT-5.6 Sol, Terra and Lunao200k_baseYes
GPT-5, GPT-5.4 and GPT-5.5o200k_baseYes
GPT-4.1 and GPT-4oo200k_baseYes
o1, o3 and o4-minio200k_baseYes
GPT-6 Astra, Sol, Terra and LunaNot publishedNo
GPT-4 and GPT-3.5 Turbo, both shut downcl100k_baseNo
text-embedding-3-small and text-embedding-3-largecl100k_baseNo

tiktoken has no entry for GPT-6 models, and a request to add one was closed as not planned. This page does not guess a GPT-6 count.

Tokens in a real API request

The counter counts plain text. A real request has more tokens than its text: message roles and boundaries, tool definitions, schemas and images all add to the count.

For the exact number, OpenAI's input token count endpoint, POST /v1/responses/input_tokens, returns what the model will receive, formatting tokens included. It needs an API key and is free to call.

Counting Claude and Gemini tokens

Claude and Gemini split text with their own tokenizers, so an OpenAI count is the wrong number for them. Anthropic says Claude 4.7 and later models produce about 30% more tokens for the same text than earlier Claude models.

Anthropic's token counting endpoint is free but rate limited, and it returns an estimate. Google's countTokens method returns the count for Gemini, and Google's rule of thumb is about 4 characters per token. Both need an API key, and both are linked under sources.

From tokens to a monthly bill

A token count tells you what one prompt costs. For a month, put the count into the AI API cost calculator with your output length and daily requests.

When the real bill grows faster than the plan, Costbrake alerts you. It reads spend from OpenAI and Anthropic, alerts when an hour costs 3x your usual hour and at least $5 more, and tracks budgets at 50, 80 and 100 percent. The Free plan covers 2 accounts. See pricing.

Questions and answers

How many characters are in a token?

For English text, OpenAI says 1 token is about 4 characters and 100 tokens are about 75 words. Other languages and code split differently, so paste your real text for the exact count.

Is my text sent anywhere?

No. The tokenizer runs in a worker inside your browser, and the text never leaves your device. Our analytics only record that a count happened and its rough size, such as 1K to 10K tokens.

Is this the same as OpenAI's tokenizer?

Yes, for plain text on o200k_base models. It uses the same vocabulary as tiktoken, OpenAI's library, and matched tiktoken's counts on our test texts. API requests add a few formatting tokens on top, which OpenAI's input token count endpoint includes.

Can it count tokens for Claude or Gemini?

No. Claude and Gemini use their own tokenizers, and their counts come from Anthropic's and Google's APIs, which need an API key. We do not show a guess. Use Anthropic's token counting endpoint or Google's countTokens method, both linked under sources.

Why are GPT-6 models not covered?

tiktoken, OpenAI's tokenizer library, has no GPT-6 entry, and we found no OpenAI page that names the tokenizer GPT-6 uses, so a count here could be wrong. For GPT-6 prompts, use OpenAI's input token count endpoint.

What does the input cost show?

Your token count times the standard input price of gpt-5.6-sol, gpt-5.6-terra and gpt-5.6-luna, checked on 9 Nov 2026. It covers uncached input only. Output tokens are billed on top, and prompts over 272K tokens move to OpenAI's long context rate.

Sources

Updated

Start with 14 days of Pro, free

Catch the next spike before the invoice.

Start free

14 days of Pro, then Free for 2 accounts. No card needed.