Count tokens for ChatGPT, Claude, Gemini, and Llama. Paste text, HTML, or a URL; we show counts across every major tokenizer and how many tokens you save by converting HTML to Markdown with mdream .
Paste text, HTML, or a URL to count tokens.
Every HTML page carries tag overhead that tokenizers charge you for. Converting to focused markdown before the LLM sees it keeps the context and drops the tax.
mdream strips scripts, nav, footers, and inline styles. What remains is the content an LLM actually needs.
We estimate cl100k_base, o200k_base, Llama 3, and Gemini counts so you can see the delta per model family.
Typical pages drop 50–80% of tokens after conversion. That's real money back on every LLM call.
GPT-4, GPT-3.5, and Claude 3+ counts come from OpenAI's official cl100k_base BPE vocabulary via gpt-tokenizer; GPT-4o counts use o200k_base. These are exact. Llama 3 and Gemini tokenizers are not publicly released, so those columns are heuristic estimates calibrated against published model documentation.
HTML carries tag overhead (class names, inline styles, script tags, nav menus, cookie banners). LLM tokenizers count every angle bracket, attribute, and piece of whitespace. Markdown strips all of that, keeping only the content an agent needs to answer a question.
No. Text, HTML, and URL inputs are tokenized in-flight on a Cloudflare Worker and discarded on response. Nothing is logged or persisted.
OpenAI's tokenizer only counts one tokenizer at a time and only accepts plain text. This tool also fetches URLs, runs mdream's HTML-to-markdown pipeline, and shows the token delta across four tokenizer families side by side.
Yes. Anthropic has stated Claude 3 and 3.5 use a tokenizer very close to OpenAI's cl100k_base. For most content, the cl100k_base column is within a few percent of Anthropic's official count.