A measured HTML versus Markdown example
The sample behind “Try sample HTML” is a short article: a title, a paragraph with a link, a two-item list, a fenced shell snippet, a two-column table, and a script plus a style block that a reader never needs. Counted with o200k_base, the pasted HTML is 246 tokens. After the in-browser cleaner removes the script and style tags and Turndown rewrites the rest, the Markdown is 93 tokens. That is 153 tokens saved, 62.2% fewer. Click Try sample HTML to reproduce it. Those three figures are pinned by the project tests against this exact sample, not a rule of thumb.
Read the percent as a property of that fragment, not as a law. Switching to cl100k_base changes the integers. A docs page full of code fences will move less than a marketing page full of layout divs. A pipe table can grow. The comparison panel says when Markdown is larger, so you are not shown a saving that did not happen.
HTML tokens are the characters you pasted, including tags. Markdown tokens are the converted string, which is what Send to AI would hand to ChatGPT, Claude, Gemini, or Perplexity if you use the button under the preview. The same conversion is what the HTML to Markdown tool does on its own. If you only have a link, URL to Markdown fetches a public page. On this counter, that fetch can tell you the Markdown token count and cannot tell you the HTML side, because the API does not return the original markup. Paste the page HTML when the saving itself is the question.
Pasted text, pasted HTML, and Markdown fetched from a URL are cut at 2,000,000 characters, and a warning says only the first 2,000,000 were counted. The count waits on a deferred copy of the field so typing stays responsive while a large paste is tokenized. Malformed HTML is parsed with the browser’s DOMParser, the same repair a page would get if you opened it. If conversion still fails, the panel shows an English error instead of a partial percent.
Ways to spend fewer tokens
Convert the article to Markdown before you put it in a prompt. Tags, class names, and inline styles are real tokens and they rarely help the model answer a question about the writing. The sample above drops more than half its tokens by that step alone, mostly by losing the markup and the script, not by summarizing the sentences. A text-based PDF is the same idea: convert it with the PDF to Markdown tool, then paste the Markdown here if you need a count. That converter does not OCR a scan and does not upload the file. A .docx follows the same order: convert it with Word to Markdown first, then count the note here.
Paste the smallest fragment that contains the question. A full document source includes the header, the footer, and the cookie banner. In developer tools, copy the article element rather than the whole page. If the page is public and you do not want to hunt for that element, fetch it with URL mode or the URL tool, then count the Markdown. You still will not get an HTML baseline unless you paste the source yourself.
Delete boilerplate the extractor kept: share rows, related links, and author bios nested inside the article. Remove repeated examples if you only need one. Do not paste both the HTML and the Markdown into the same prompt unless the question is the difference between them. Sending both pays for the article twice. The send a webpage to ChatGPT guide covers the separate limit on how much of a prompt can ride in a chat URL. A count that fits 128k can still be too long for that link, and Send to AI falls back to copying when the URL would be too large.
Limits you should know before you trust a number
Text mode and Paste HTML mode do not upload the field. Public URL mode does call WebInk’s server, which fetches the URL with the same endpoint as the URL tool. That fetch sees a public page, not your cookies. A login wall comes back thin or empty. For a tab you are already signed into, convert with the extension and paste the Markdown here if you need the count.
The counter does not estimate dollars. Vendor rates change, output tokens are a different meter, and cached prefixes are outside this box. It also does not list official context windows. If a fit line says the text fits in 32k, it means the count is at or under the size you selected.
Special marker strings such as the end-of-text token are counted as tokens instead of aborting the count. That keeps a paste of model output from breaking the page. It is still the OpenAI encoding, not a Claude or Gemini bill.
Compared with OpenAI’s tokenizer and the extension
OpenAI publishes a tokenizer where you can see the colored splits for text you paste. Use it when you need to see which pieces a word broke into. Use this page when you need the HTML-versus-Markdown delta, or a Markdown count for a public URL. Pasted HTML is converted with the same in-browser cleaner as the HTML tool. A URL is converted by the public Markdown API, the same one the URL tool calls, and that response does not include the original HTML. This tool does not paint token highlights.
The WebInk extension is the path for the page on your screen. It extracts the article, converts it, and can send it on. It does not show tokens. The online counter is the path for text you can paste, and for public URLs when a Markdown count is enough. The two meet when you copy extension Markdown into the Text tab.
| Job | This counter | OpenAI tokenizer | WebInk extension |
|---|---|---|---|
| Count pasted text with OpenAI encodings | Yes | Yes | No |
| Show each token’s boundaries | No | Yes | No |
| Compare pasted HTML with Markdown | Yes | No | No |
| Count Markdown from a public URL | Yes | No | No |
| Convert a logged-in tab | No | No | Yes |
OpenAI’s tokenizer is on platform.openai.com/tokenizer. WebInk does not operate that page.
Add the WebInk extension