Token Counter 100% local
Your prompt Loading tokenizer…

Token counter

Count tokens for GPT, Claude, and Gemini in your browser.

Paste a prompt and MarkDone shows how many tokens it uses for each model, so you can stay inside context limits and estimate API cost before you send it. The GPT figure is an exact local tokenization; Claude and Gemini are clearly-labelled estimates. Your text is never uploaded.

Exact GPT countUses OpenAI's open o200k_base tokenizer (GPT-4o, GPT-4.1, and newer) locally.
Claude & Gemini estimatesHonest, labelled approximations since those tokenizers are not public.
Private by designCounting runs in your browser — prompts never leave your device.

How to count tokens

  1. Paste or type your prompt into the editor.
  2. The counts update live as you type — nothing is sent anywhere.
  3. Read the exact GPT count plus Claude and Gemini estimates, with character, word, and line totals.

Exact count vs estimates

OpenAI publishes its tokenizer, so the GPT number matches what the API would count. Anthropic and Google keep theirs private, so the Claude and Gemini figures are estimated from the GPT tokenization — typically within about 10 to 15 percent. For billing-critical numbers, confirm with each provider's official token-count endpoint.

Why token counts matter

Tokens drive both context limits and API pricing. Knowing the count before you send a prompt helps you avoid truncation, control cost, and right-size system prompts. To shrink large JSON payloads in a prompt, convert them to the compact TOON format.

Is my prompt uploaded when I count tokens?

No. Token counting runs entirely in your browser. Your prompt is never sent to MarkDone or to any model provider.

How accurate is the GPT token count?

It is exact. The GPT figure uses OpenAI's open o200k_base tokenizer (GPT-4o, GPT-4.1, and newer) running locally, so it matches what the OpenAI API would count.

Are the Claude and Gemini numbers exact?

No, they are clearly-labelled estimates. Anthropic and Google do not publish their tokenizers, so MarkDone estimates from the exact GPT tokenization, usually within about 10 to 15 percent. For billing-critical counts, use each provider's official token-count endpoint.

Why do the three models show different token counts?

Each model uses its own tokenizer, so the same text splits into a different number of tokens. Counts are usually close but rarely identical across GPT, Claude, and Gemini.

How can I reduce the number of tokens in a prompt?

Trim redundant wording and compact any structured data. For JSON specifically, converting it to the TOON format can cut tokens noticeably. See the MarkDone JSON to TOON converter and the guide on how TOON saves tokens.