Hype StackHypeStack

AI token counter.

Paste a prompt and see its token count as you type: exact for OpenAI models, a clearly marked estimate for Claude, plus what it costs.

  • Free
  • No signup
  • Runs in your browser

3 lines. Counted in your browser, nothing is sent anywhere.

OpenAI tokens

58

Exact, o200k_base: GPT-4o, GPT-4.1, o-series, GPT-5.

Claude tokens

~70

Estimate. Claude's tokenizer isn't public.

Characters

263

Including spaces.

Words

49

Split on whitespace.

The Claude number is the OpenAI count plus 20%, a rough rule of thumb. For an exact count, call Anthropic's token counting endpoint for the model you use.

Input cost

Example prices per million input tokens. Check the provider's pricing page and type the real ones.

$
$
OpenAI$0.00015
Claude (estimate)$0.00021

How it works.

  1. 1

    Paste a prompt, a system message, or a whole file.

  2. 2

    Read the exact OpenAI count, the Claude estimate, characters and words as you type.

  3. 3

    Type the prices you pay per million tokens to see what the text costs.

What a token is

Models don't read letters or words. They read tokens: chunks of text from a fixed vocabulary, often a whole short word, sometimes part of a long one, sometimes a single symbol. Context limits and prices are counted in tokens, so the token count is the number that matters, not the word count.

The OpenAI count here uses o200k_base, the vocabulary behind GPT-4o, GPT-4.1, the o-series and GPT-5, running in your browser through the js-tiktoken library. It's the same tokenizer the API uses, so the number matches.

Why Claude gets an estimate, not a count

Anthropic hasn't published Claude's tokenizer, so no website can count Claude tokens exactly offline. Anyone who shows you a precise Claude number without calling Anthropic is guessing.

This tool guesses in the open: it takes the OpenAI count and adds 20%, and labels the result as an estimate. When you need the real number, Anthropic's API has a token counting endpoint that returns it for the model you pick.

Questions, answered.

How do I count tokens in my prompt?

Paste the text into the box above. The OpenAI token count, the Claude estimate, characters and words update as you type. Nothing is uploaded, the counting happens in your browser.

Is there an exact Claude token counter?

Not offline. Claude's tokenizer isn't public, so the Claude number here is an estimate: the OpenAI count plus 20%. For an exact count, use the token counting endpoint in Anthropic's API with the model you plan to call.

Which tokenizer does GPT-4o use?

o200k_base, a vocabulary of about 200,000 tokens. GPT-4.1, the o-series reasoning models and GPT-5 use it too. Older models like GPT-4 and GPT-3.5 Turbo used cl100k_base, which gives slightly different counts.

How many tokens is 1,000 words?

For plain English, usually somewhere around 1,300 tokens with OpenAI's tokenizer. Code, other languages, numbers and unusual words all push it up, so paste your actual text to be sure.

Are the prices in the cost box current?

No, they're example numbers. Providers change prices and charge differently for input, output and cached tokens. Look up the model you use and type its price per million tokens into the fields.

More free tools.

All tools

Counting tokens? You're building with AI.

Add an AI chat page to the app.. Show the token count and cost under each message.. Let users pick the model per chat.

Hype Stack is a free full-stack starter made to be built on with Claude Code or Cursor, and it has an AI chat pack for when your app needs one.