Tools / LLM Token Counter (Estimate)

LLM Token Counter (Estimate).

Estimate how many LLM tokens a prompt uses, with a breakdown by words, numbers, symbols and scripts.

Runs in your browser

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result
Estimate
Breakdown

About LLM Token Counter (Estimate)

The LLM Token Counter gives a quick estimate of how many tokens a piece of text will use, so you can check a prompt against a context window or budget before you send it. It is an estimate, not an exact count: every model family has its own tokenizer and vocabulary, and the same sentence can be 10 to 15 percent longer or shorter depending on the model. The counter imitates how byte-pair-encoding tokenizers split text. It separates words together with their leading space, contractions such as 're and 'll, digits in groups of up to three, runs of punctuation and whitespace, and then estimates tokens per piece: short English words are usually one token, long words are split into several, Cyrillic and other non-Latin scripts take roughly one token per two or three letters, and Chinese, Japanese and Korean text takes about one token per character. For example, "Hello, world! This is a test." comes out at nine tokens, which matches common tokenizers. The breakdown table shows where the tokens come from, which explains why code, JSON and non-English text cost more than plain English prose: punctuation and indentation add up quickly. A typical mistake is budgeting by words or characters alone; the characters per token figure in the result shows how far your text is from the usual four characters per token. When you need the exact number for billing, use the tokenizer or token-counting endpoint of your provider. Your text never leaves the browser.

How to Use

  1. Paste a prompt, a document or a code file into the text field.
  2. Read the estimated token count, the likely range and the characters-per-token ratio.
  3. Use the breakdown to see whether words, symbols, whitespace or non-Latin text drive the count.

Frequently Asked Questions

How accurate is the estimate?

For English prose and typical code it is usually within 10–15% of real tokenizers. It can drift further for unusual text such as long numbers, base64 blobs or rare scripts. The likely range shows ±15%.

Why not count tokens exactly?

Exact counts need the model's own vocabulary, which differs between providers and model generations and is several megabytes large. This tool stays small and offline; use your provider's tokenizer or token-counting API for billing-grade numbers.

Why does non-English text use more tokens?

Tokenizer vocabularies are trained mostly on English, so common English words are single tokens while words in other languages are split into several pieces.

Is my text uploaded?

No. The estimate is computed in your browser and nothing is sent to a server.

Related Tools