Cloudflare Launches Markdown for Agents: A New Feature That Saves AI Crawlers 80% of Their Tokens
Contents
The way traffic reaches you has changed in the AI era. Is your website ready for "non-human" visitors? Cloudflare's new Markdown for Agents hands AI the structured good stuff directly, so it stops wasting tokens chewing through HTML.
When we used to do website optimization (SEO), it was all about making things easy on the eyes for "people" and readable for Google's crawler.
But things have changed. More and more traffic now comes from AI Search (like ChatGPT Search) and coding agents (like Cursor and Claude Code). These AIs actually hate HTML. To them, the <nav>, <script>, and class="flex justify-center" in a web page are all noise. They waste tokens and get in the way of understanding.
Cloudflare clearly saw this pain point and launched Markdown for Agents. Simply put, when an AI visits your website, Cloudflare automatically "skins and debones" the page and serves the AI just a clean plate of Markdown.
The key part: this feature is free, and it's done with the flip of a switch.
Why Do We Need This?
Developers abroad have a really vivid analogy for it:
"Feeding raw HTML to an AI is like paying by the word to read packaging instead of the letter inside."
(Feeding HTML to an AI is like paying someone to read you a letter, and they read out the postmark on the envelope and every flyer that came with it before they even get to the letter itself.)
Simply put, it's a waste of money.
A simple ## About Us takes just 3 tokens in Markdown, but as HTML, <h2 class="section-title" id="about">About Us</h2> burns 12-15 tokens. Add all the <div> wrappers that mean nothing to an AI, and token usage explodes.
Look at the Real Numbers
Here's how dramatic Cloudflare's own test on its blog was:
- HTML version: 16,180 tokens
- Markdown version: 3,150 tokens
- Savings: 80%
This isn't just about saving money. More importantly, it saves precious context window space. Markdown is basically already the standard language of the AI world: the structure is clean, AI reads it effortlessly, and the output naturally comes out better.
How Does It Work?
▌ Technical principle: Content Negotiation
Cloudflare handles this for you right at the edge. Technically, it uses HTTP's Content Negotiation mechanism.
When an AI agent (like Claude Code) visits your website, as long as its request header includes Accept: text/markdown, Cloudflare intercepts the request and converts the HTML to Markdown on the fly before sending it back.
Implementation Example
You can test it with curl against Cloudflare's developer docs:
curl https://developers.cloudflare.com/fundamentals/reference/markdown-for-agents/ \
-H "Accept: text/markdown"
If you're calling it from inside Workers, it'll look something like this:
const r = await fetch(
`https://developers.cloudflare.com/fundamentals/reference/markdown-for-agents/`,
{
headers: {
Accept: "text/markdown, text/html", // Tell the server I accept Markdown too
},
}
);
// Cloudflare also thoughtfully gives you a header telling you how many tokens were used
const tokenCount = r.headers.get("x-markdown-tokens");
const markdown = await r.text();
Who's Already Using It?
This isn't the future tense; it's happening right now.
Many mainstream coding agents, like Claude Code and OpenCode, have already started sending these headers in their requests. That means if you turn this feature on, developers using these tools will have a much smoother experience reading the docs on your site.
How Do You Turn It On? (Step-by-Step)
The feature is currently in beta and available for free on Pro, Business, and Enterprise plans (SSL for SaaS users get it too).
Setup is super simple; it really is just one toggle:
- Log in to the Cloudflare dashboard
- Click into your website (Zone)
- Find Quick Actions on the right
- Switch Markdown for Agents on
Content Signals Policy: A User Manual for AI
When Cloudflare returns Markdown, it automatically adds a Content-Signal header:
Content-Signal: ai-train=yes, search=yes, ai-input=yes
It's like the "park rules" for AI, clearly telling them:
- ai-train=yes: You can use this to train models
- search=yes: You can use this in search results
- ai-input=yes: You can use this as AI input (including agentic use)
In the future, Markdown for Agents will offer options for customizing these policies.
Tracking Usage on Cloudflare Radar
Want to know how many AIs are reading your site as Markdown?
Cloudflare Radar now has a dedicated AI Insights page where you can see traffic data for AI bots and crawlers worldwide. You can see which AIs are requesting Markdown and how many requests they're making.
Here's the request data for OAI-Searchbot (the crawler OpenAI uses to power ChatGPT search):
All of the data is available through the Cloudflare Radar API.
Other Ways to Convert
If the documents you need to convert aren't hosted on Cloudflare, or Markdown for Agents doesn't fit your case, Cloudflare offers other options:
- Workers AI AI.toMarkdown(): Supports many document types (not just HTML), and has a summarization feature too
- Browser Rendering /markdown REST API: For when you need to render a dynamic page in a real browser first and then convert it
Conclusion
The way web content is consumed has changed, and our infrastructure should change with it.
The core value of Markdown for Agents:
- Saves 80% of tokens: Lowers AI processing costs, for both you and your users.
- Painless upgrade: You don't have to change any code; Cloudflare converts it for you.
- A new SEO battlefield: Makes your content easier for AI to understand and cite.
For website owners, it's a zero-cost, high-return optimization. As AI agent traffic keeps growing, this feature will only become more important.
It's genuinely really convenient. I recommend everyone go turn it on in the dashboard! 👍
About Cloudflare (NET)
Cloudflare is a US-listed company (ticker: NET) focused on network security, performance optimization, and edge computing services. The launch of Markdown for Agents shows Cloudflare's forward-looking positioning for the AI era.
From an investment perspective, Cloudflare keeps investing in AI-related infrastructure (Workers AI, Browser Rendering, Markdown for Agents, and more) to claim the entry point for AI agent traffic. As AI agent traffic keeps growing, Cloudflare's edge computing platform could become important infrastructure for AI applications.
👉 Want to learn more about Cloudflare stock? Check out our Cloudflare (NET) market data page
References
- Introducing Markdown for Agents - Cloudflare Blog
- Markdown for Agents - Cloudflare Developer Docs
- Content Signals Policy
- Cloudflare Radar - AI Insights
Keywords
Cloudflare, Markdown for Agents, AI agents, AI crawlers, token optimization, content negotiation, HTML to Markdown, Content Signals, Web optimization, SEO, AI-first web
Latest articles
CoinMarketCap Launches AI Agent Skills: Let Claude Code Check Crypto Prices, Generate Reports, and Do Research Directly
2026-03-04Claude Code v2.1.59 ~ v2.1.63 Update Roundup: HTTP Hooks, a Big Memory Cleanup, and Shared Worktree Settings
2026-03-04Claude Code v2.1.52 ~ v2.1.59 Update Roundup: Auto Memory, a Wider Remote Control Rollout, and Stability Fixes
2026-02-26[Caijing Haojiao Podcast Notes] 2026-02-24 Software Stock Crash! Why Are There More and More AI Victim Stocks?
2026-02-24AMD and Meta Sign a 6GW GPU Megadeal: Breaking Down the $60 Billion AI Chip Agreement
2026-02-24