Token and context estimator

Token counts decide two things that are easy to get wrong: whether a document fits in the context window at all, and what the request will cost. Both questions need an answer before you build the prompt, not after the API returns an error.

A real tokeniser table is one to two megabytes, which is unreasonable for a text box, so this uses a character-based approximation: about four characters per token for Latin text and roughly 0.7 tokens per CJK character. Expect within about 15% of a real count.

Runs entirely in this tab. Nothing you paste is uploaded, logged or stored — close the page and it is gone.

Questions about this tool

How accurate is the estimate?

Within roughly 15% for prose. Code and JSON tokenise worse than English because punctuation becomes its own token, so treat long JSON payloads as slightly underestimated.

Which models does it cover?

It is model-agnostic on purpose — the point is the order of magnitude and whether the text fits. Different vendors use different vocabularies, so the same paragraph genuinely costs a different number of tokens in each.

Does it cost anything to measure?

No. Nothing is sent anywhere and no API is called; the count is computed from the characters in the box.

AI alternatives from the directory

Browse chatbot tools →

This utility handles the job by hand. These do it with a model — worth a look when the task outgrows copy and paste.

ChatGPT logo
ChatGPT
Chatbot
☆

The conversational AI that started it all

OpenAI's flagship chatbot for writing, coding, brainstorming and analysis. The free tier now includes GPT-4o mini, with

Claude logo
Claude
Chatbot
☆

An AI assistant that's helpful, harmless and honest

Anthropic's Claude excels at nuanced reasoning, long-document analysis and careful writing. Popular with professionals

Gemini logo
Gemini
Chatbot
☆

Google's multimodal AI model family

Gemini brings text, image, audio and video understanding into one model, deeply integrated across Google Workspace and