Skip to content

Token Counter

Paste text and get a script-aware token estimate, a full character breakdown, and an honest account of how far off the estimate is likely to be.

This is an estimate, not a token count. No tokenizer runs on this page — a real one needs its vocabulary and merge table, which is megabytes of data per model family. What you get is a character-class heuristic: close on English prose, high on punctuation-dense text like JSON or minified code, and widest on scripts the vocabulary has few merges for. For the exact figure, read the usage object on any completion response — prompt_tokens and completion_tokens are what you are billed on, they cost nothing to read, and they settle the question for the model you are actually calling.
Estimated tokens
81

An estimate. Paste a real count above to see how far off it is on your kind of text.

Characters
354
Characters excluding whitespace
292
Words
63
Lines
1
Characters per estimated token
4.37
Estimated tokens per word
1.29
characters ÷ 4, the usual rough ceiling
89

Where the estimate comes from

Latin letters
280 chars → ~71 tokens (87.0%)
Digits
3 chars → ~1 tokens (1.2%)
Punctuation and ASCII symbols
9 chars → ~9 tokens (11.1%)
Whitespace and line breaks
62 chars → ~0 tokens (0.0%)
What this assumes: A short Latin word costs one token and grows by about one per four extra characters; digits cost one token per group of three; a single space before a word is free because it merges into that word, while indentation and blank lines are not; Cyrillic, Greek, Arabic and Hebrew cost roughly one token per two characters; Chinese, Japanese and Korean roughly one per character; emoji and rarer scripts about two per code point. Real vocabularies differ from each other by 20–30% on the same non-English text, so treat this as a range, not a figure.

What this number is good for, and what it is not

Tokens are the unit you are billed in, so a token count is the closest thing to a price tag that a piece of text has. This page gives you one without sending your text anywhere, which is the main reason to use a counter that runs in the browser: the text you most want to measure is usually the text you least want to paste into someone else’s server.

It is an estimate. Use it to size things — is this prompt 400 tokens or 4,000, will this document fit, is the system prompt or the retrieved context the expensive half. Do not use it to reconcile an invoice, to set a hard limit that a request must not cross, or to argue with a provider about a bill. For any of those you want the real count, and the real count is free: send the request, read usage.prompt_tokens, and you have the authoritative number for the exact model you called.

A few things this deliberately does not count, because they are not in your text. Chat models wrap every message in template markup — role markers, turn separators, sometimes a few tokens of preamble — which typically adds a handful of tokens per message. Tool and function schemas are serialised into the prompt and are frequently larger than the prompt itself. Reasoning models emit hidden thinking tokens that you pay for and never see. All three are why your own count and the number on the bill differ even when your tokenizer is exactly right.

Token Counter · Multigrid