Skip to content

Clean Context

Web page to clean markdown

Strip a page down to its article, convert it to markdown, and see exactly how many tokens you saved.

Fetched by our endpoint

How it works

  1. Fetch

    Your URL, retrieved by a first-party endpoint that never logs it.

  2. Extract

    Readability finds the article; the furniture is dropped after.

  3. Convert

    Markdown out, with code fences keeping their language.

  4. Measure

    Tokens before against tokens after, priced for your model.

Why Clean Context

Every other tool does half the job: it either cleans the page or counts the tokens, never both, so you never learn what the cleaning was worth.

Readers and converters hand back markdown and stop there. Token counters take text and count it. So the two things you actually want to know together — is this clean, and what does it cost me — live in different tabs, and nobody tells you whether the cleanup was worth doing.

The tools that do report a saving usually report characters removed. That number is close to useless: raw HTML is mostly tags, so it lands around ninety percent on every page and never moves. What you pay for is tokens, and the only honest comparison is tokens of readable text before against tokens of markdown after.

The other quiet failure is code. Most HTML-to-markdown conversion drops the language off a fence, because the language lives in a class name the converter throws away. For an audience feeding code to a model, an unlabelled fence is a real loss, and it is invisible until the model guesses wrong.

It tells you what the cleanup was worth

Cleaning a page is easy. Knowing whether it saved you anything is the part nobody shows, and it is the only reason to do it.

Compared withJina Reader · MarkDownload · Turndown demos · tiktokenizer · Reader mode
CapabilityElsewhereHere
Finds the article and drops the furnitureYes:Readers and reader-mode do this wellYes:Readability, extracted before sanitising
Counts tokens for the model you payNo:Converters do not count; counters do not convertYes:Exact for OpenAI encodings, labelled estimates elsewhere
Shows the cost of the differenceNo:Rarely offered at allYes:Tokens saved times current input price
Keeps the language on a code fencePartly:Commonly dropped with the class attributeYes:Reads language-*, lang-*, and MDN's brush: form
Output shaped for a promptPartly:Markdown only, aimed at republishingYes:Markdown, prompt block, llms.txt, .md download
Works without sending your page anywhereNo:Hosted readers fetch and process server-sideYes:Paste mode never leaves the tab

What it does

Give it a URL or paste a page’s HTML. It finds the article, throws away navigation, cookie banners, share widgets and comment threads, and hands back markdown you can drop straight into a prompt. Then it counts the tokens, so you can see what the cleanup actually bought you.

Why the token count matters more than the character count

Most cleanup tools report how many characters they removed. That number is close to useless: raw HTML is mostly tags, so it always lands around ninety percent and never moves. What you are really paying for is tokens, and the honest comparison is tokens of readable text before against tokens of markdown after.

The figure shown alongside it is cost — tokens saved multiplied by the current input price. A documentation page trimmed from forty thousand tokens to three thousand is not an abstract win; it is a smaller bill on every call that includes it, and it buys back context you can spend on something else.

Why every model reports a different number

A tokenizer is specific to a model family. GPT-4o and its successors use an encoding called o200k_base; older GPT-3.5 and GPT-4 models use cl100k_base. The same paragraph measures differently under each, and neither matches what Claude or Gemini count.

Both OpenAI encodings are computed exactly. Claude and Gemini figures are estimates and are labelled as such, because their tokenizers are not published in a form that runs in a browser. An approximation presented as an exact number would be worse than no number.

What clean means here

Code fences keep their language, so a TypeScript block stays TypeScript instead of collapsing into an unlabelled fence. Tables survive as tables. Relative links are rewritten to absolute so they still resolve. Base64 images are dropped, since a megabyte of inline image data helps nothing and costs a great deal.