Tools

Token Counter

Exact GPT token counts, plus Claude and Gemini estimates

Your text is tokenised in your browser. Nothing is sent to OpenAI, Anthropic or anyone else.

Estimates for other model families

Other providers use different tokenizers and do not publish them for browsers, so these are estimates based on typical ratios (±15%).

How to count tokens

  1. Paste your prompt, document or chat history.
  2. The exact token count for OpenAI's tokenizers appears instantly, along with words and characters. Choose o200k for GPT-4o, GPT-4.1, the o-series and GPT-5, or cl100k for GPT-4 and GPT-3.5.
  3. Tick Show tokens to see how the text is split, with each token highlighted. Estimates for Claude, Gemini, Llama and other model families are shown below.

What tokens are and why they matter

Large language models do not read letters or words; they read tokens, chunks of text from a fixed vocabulary of around 100,000 to 200,000 pieces. A common English word is often one token, including its leading space, while rare words, names, numbers, emoji and code are split into several. As a rule of thumb, one token is about four characters or three-quarters of an English word, but other languages often need more tokens for the same meaning.

Token counts matter for three reasons. API pricing is per token, for both input and output. Every model has a context window, the maximum number of tokens it can consider at once, including your prompt, any documents, the chat history and the reply. And longer prompts are slower. Counting before you send helps you trim prompts, split documents into chunks that fit, and budget costs with our LLM Cost Calculator.

The OpenAI counts use the open-source gpt-tokenizer library, a faithful port of OpenAI's tiktoken, loaded once into your browser. Anthropic, Google and others do not publish browser tokenizers, so their figures are labelled estimates. Your text never leaves the page.

How many tokens is 1,000 words?

About 1,300 to 1,400 tokens for typical English prose with OpenAI's tokenizers. Code and other languages usually need more.

Is the Claude count exact?

No. Anthropic's tokenizer is not available in browsers, so the Claude figure is an estimate. Use Anthropic's token counting API for exact numbers.

Do spaces and line breaks count?

Yes. Spaces are usually merged into the following word's token, but extra spaces, indentation and blank lines add tokens.