Estimate token counts for any text with per-model cost breakdowns across OpenAI, Anthropic, Google, and more. Build multi-turn chat conversations and export as ready-to-run API request JSON for OpenAI, Anthropic, or Gemini. Visually build function/tool-calling JSON schemas for OpenAI or Anthropic tool use.
cl100k_base and o200k_base give the exact token count OpenAI's own API would report for that encoding. Non-OpenAI models (Anthropic, Google, Meta, Mistral) use their own tokenizers, so treat counts for those rows as a reasonable approximation rather than an exact match.
Estimate token counts for any text with per-model cost breakdowns across OpenAI, Anthropic, Google, and more. Build multi-turn chat conversations and export as ready-to-run API request JSON for OpenAI, Anthropic, or Gemini. Visually build function/tool-calling JSON schemas for OpenAI or Anthropic tool use.
Paste text into the Token Counter to get a count and a per-model input and output cost estimate across OpenAI, Anthropic, Google, Meta and Mistral models. The Model Comparison tab lists context windows and prices.
Counts using the cl100k_base or o200k_base encodings are exact for OpenAI models. For Claude, Gemini and other models the figure is an approximation, and prices are approximate and may be outdated.
Build the conversation in the Chat Format tab and export it as ready-to-run request JSON for each API.
The Tool Schema Builder tab visually builds JSON schemas for OpenAI or Anthropic tool use.
No. This tool runs entirely in your browser — your input is processed locally on your device and is never uploaded or stored on a server.