ChatGPT & Claude Token Counter — Free, Runs in Your Browser
Paste a prompt, a document or a whole conversation to see how many tokens it uses. ChatGPT counts are exact, using OpenAI's own tokenizer; Claude counts are an estimate, because Anthropic doesn't publish its tokenizer. Pick a context-window size to see how much room is left before the model starts losing the start of the conversation. Everything is counted in this page: nothing you paste is uploaded or kept.
Exact count with OpenAI's own tokenizer.
Anthropic doesn't publish Claude's tokenizer, so this is an approximation. Treat it as a guide, not an exact figure.
Uses the Claude estimate. The model's reply also counts against the window, so leave room for it.
What a token is
Language models don't read words or characters; they read tokens, chunks of text from a fixed vocabulary. In English a token averages about four characters, so 1,000 tokens is roughly 750 words. Code, numbers, and languages that don't use the Latin alphabet usually take more tokens for the same length of text, which is why a counter beats a word count when you're near a limit.
Which tokenizer to pick
o200k_base is the vocabulary used by current GPT models, from GPT-4o onwards. cl100k_base is the older one used by GPT-4 and GPT-3.5. The same text gives different counts under each, so pick the one that matches the model you're using. Both are OpenAI's real vocabularies, loaded into this page the first time you choose them.
Why the Claude number is an estimate
Anthropic doesn't publish Claude's tokenizer, so no browser tool can count Claude tokens exactly. The estimate here uses the same rule as ChatPeer's in-app context meter: about four characters per token for Latin script, and a denser ratio for other scripts. For an exact figure, Anthropic's API has a token-counting endpoint.
Context windows
A context window is the most text a model can consider at once: your messages, its replies, and any files or instructions. When a conversation outgrows it, the earliest parts are dropped or summarised, and answers start ignoring things you said at the beginning. The buttons cover common window sizes; enter your model's exact limit in the custom field. Leave headroom, because the model's reply counts against the same window.
Nothing leaves this page
Counting happens in JavaScript in this tab. There's no upload and no server to receive what you paste, which matters if the text is a contract, client notes or code. It's the same rule the ChatPeer extension follows: its context meter shows this count live under every Claude and ChatGPT conversation, without the text leaving your browser.
Want this built directly into your sidebar?
ChatPeer adds folders, full-text search, and one-click export to Claude and ChatGPT. Everything stays in your browser.
Add to Chrome — it's free