Your AI Is Paying to Read Junk. Here's How to Cut It.
When your AI reads a web page, you pay for every bit of it, including the hidden code that makes the page look nice. Your AI doesn't need that code. It only needs the words.
AI models read and charge by the token, a small chunk of text that is often part of a word. More tokens means a bigger bill.
We tested 20 real web pages. Our tool, Page to Markdown, hands your AI just the article. It was about 98% smaller than the raw page and about half the size of a plain-text copy, and it kept nearly all of the real content. It costs about a cent per page (13 sats).
What's the junk?
Every web page is built from HTML, the code behind the page that places the menus, buttons, ads and images. A typical page in our test had about 107,500 tokens of HTML, and the article was a tiny part of that.
There are three common ways to give a page to an AI:
- The raw page. All the HTML, junk included.
- A plain-text copy. The code is stripped out, but menus, footers and other clutter stay in. Headings and code examples lose their shape.
- Page to Markdown. Just the article, in markdown, a simple text format that keeps headings, lists and code examples readable.
The results

Here is a typical page from our test. Costs are for one read on an AI model that charges $2 per million tokens of input, the price of popular models such as Claude Sonnet 5.5, GPT-6.1 Sol and Gemini 3.1 Pro.
| Typical page | Size (tokens) | Cost for your AI to read it once |
|---|---|---|
| Raw page | 107,522 | about $0.22 |
| Plain-text copy | 3,436 | about $0.007 |
| Page to Markdown | 1,562 | about $0.003, plus about $0.01 for the service |
Some pages are far worse. Stripe's API page was 597,196 tokens raw, so reading it once on a $2 model costs about $1.19. Cleaned up by Page to Markdown, it was 2,384 tokens: about half a cent to read, plus about a cent for the service.
Smaller is no help if the content is gone, so we checked. Page to Markdown kept a median of 94% of each page's main text. It kept the section headings on a typical page and 100 of the 102 code examples (one of the two it dropped was a duplicate).
Does it actually save you money?
It depends on what your AI reads today.
If your AI reads raw pages, yes. Page to Markdown paid for itself on all 20 pages, on every model we tried that costs $2 per million tokens or more.
If your AI already gets a plain-text copy, it's about even. On a $2 model, one read of a plain-text copy is cheaper overall, because the service costs about a cent. The savings add up when your AI rereads a page over a long task. After about five reads, Page to Markdown came out a little ahead. On a pricier $4 model, it's about even after just one read.
If your tools already clean pages well, you won't save much. A free, open-source tool called trafilatura produced output of about the same size, slightly smaller than ours on a typical page. If you already run something like that, choose Page to Markdown for the cleaner format and zero setup, not to cut costs.
On very cheap models, it won't pay off. At $0.10 per million tokens, reading is so cheap that one cent rarely earns itself back. It also saves little if your setup uses caching, a discount for re-sending the same text.
In short, it pays most when your AI would otherwise read raw pages, uses a pricier model, or rereads pages over a long task.
What it can't do
Some websites block automated visitors. We tried six hard pages, and Page to Markdown was blocked on five: npm, Stack Overflow, AP News, Reuters and Nike. Each blocked call is refunded automatically as Amazap credits, but you don't get the page either. Page to Markdown can't get past sites that block bots.
A bug we caught along the way
Our first test caught a bug in our own tool: it kept only about 2% of each article. We fixed it and retested, and the numbers above are from the final run.
Try it
Connect your AI app to the Amazap MCP (MCP is a standard way to plug tools into AI apps), then ask for Page to Markdown on any public web page. You see the price before you pay: 13 sats, about a cent. To learn how AI agents pay for tools like this, see agentic payments on Amazap.
How we tested
- Pages: 20 public pages: Wikipedia, coding docs, news, blogs, a product page and government sites. Six hard-to-fetch pages were tested separately.
- Counting: OpenAI's o200k_base tokenizer. Other models count a little differently, so exact costs vary.
- Comparisons: raw HTML via curl, plain text via BeautifulSoup, and trafilatura 2.3.1. Page to Markdown used its default settings.
- Prices: input-token list prices from Anthropic, OpenAI and Google, checked 2026-10-10. Page to Markdown was 13 sats per page, about $0.0108 that day.
- Break-even: a page pays off when tokens saved × price per token × number of reads is more than the service price. On a $2 model that's about 5,400 tokens saved for one read, or about 1,100 per read over five reads.
- Limits: 20 pages is a small sample, and all could be fetched with simple tools. "Main text kept" is measured against trafilatura. Page to Markdown still drops math formulas on Wikipedia.
- Full data: benchmark report and per-page data, with per-page numbers and per-model cost tables.
FAQ
Why does a web page cost so much for an AI to read?
Most of a web page is code for layout, menus and ads, and your AI pays for all of it. Cleaned up, a typical page in our test was about 98% smaller.
How much can I save by giving my AI markdown instead of HTML?
A lot, if your AI reads raw pages. On a $2-per-million-token model, a typical page costs about 22 cents to read raw and less than half a cent as markdown, plus about a cent for the service.
Will Page to Markdown save money if my tools already clean up pages?
Not much. Free tools that clean pages well make output about the same size. Page to Markdown is worth it for the clean format and zero setup, or when your AI rereads pages many times.
Can it read sites that block bots?
No. It was blocked on five of the six hard-to-fetch pages we tried. Blocked calls are refunded automatically as Amazap credits.
How much does Page to Markdown cost?
13 sats, about a cent per page. That is the full price, and you see it before you pay.