← All tools
GPT
AI

GPT Token Counter

Count tokens for GPT-5, GPT-4o, and older OpenAI models as you type, using the exact same tokenizer OpenAI's API uses. 100% client-side — your text is never sent anywhere.

🔒 Runs entirely in your browser — no data is ever sent anywhere

0
Tokens
0
Characters
0
Words

Frequently asked questions

Which models does this cover?

Two tokenizers, chosen automatically from the model you pick: o200k_base for the GPT-5 and GPT-4o families plus the o-series reasoning models, and cl100k_base for GPT-4, GPT-4 Turbo, GPT-3.5 Turbo, and the text-embedding-3 models. It does not cover Claude, Gemini, or other non-OpenAI models — their tokenizers aren't compatible with tiktoken.

Is this the exact same count the OpenAI API would bill me for?

For a plain text prompt, yes — this uses js-tiktoken, the same byte-pair-encoding tokenizer OpenAI's own tiktoken library uses, with the identical vocabulary files. Chat-format requests add a small fixed per-message overhead on top of the raw text tokens (for role/name formatting), which this tool doesn't add since it only tokenizes the raw text you paste.

Why do the same words cost different token counts in different models?

o200k_base (GPT-5/GPT-4o) uses a larger 200k-word vocabulary than cl100k_base's 100k, which packs non-English scripts and common multi-word phrases more efficiently — the same sentence can tokenize to noticeably fewer tokens under o200k_base, especially for non-Latin scripts.

Why did the page pause briefly when I opened it?

The tokenizer's vocabulary file (roughly 1–2 MB depending on the model) loads on demand the first time you use this tool or switch model families, so it's cached in your browser tab from then on rather than bundled into every page on the site.