Cloudflare, best known as a web security and content delivery network giant, has quietly moved deeper into the AI infrastructure space ,and this time, it’s targeting one of the most overlooked inefficiencies in how AI agents consume the web.
The company has launched a new feature called Markdown for Agents, which automatically converts web pages from HTML into Markdown in real time, but only when an AI agent is the one doing the asking. The result, according to Cloudflare, is a token reduction of up to 80 percent per page.
Large language models can technically read raw HTML, but doing so is wasteful. Every `<div>`, script tag, and formatting wrapper in a typical webpage becomes a token the model must process , and tokens cost money. To illustrate the scale of the problem, Cloudflare noted that its own blog post would clock in at over 16,000 tokens as raw HTML. Rendered as clean Markdown, that same post drops to roughly 3,150 tokens. For companies running thousands of agentic queries per day, the cost savings add up fast.
How It Works
The feature operates at Cloudflare’s edge network, meaning no changes are needed to a website’s code, CMS, or templates. When an AI agent sends an HTTP request with an `Accept: text/markdown` header ,a signal that tools like Claude Code and OpenCode already send by default, Cloudflare intercepts the request, fetches the original HTML from the origin server, converts it to Markdown on the fly, and delivers the cleaner version to the agent.
Cloudflare also adds an `x-markdown-tokens` response header, giving agents visibility into token count before processing. This allows agents to decide whether a document fits within their context window or needs to be broken into smaller chunks. Additionally, converted responses include a `content-signal` header indicating publisher permission for AI training, search indexing, and agentic use , with plans to let site owners customize those settings in future releases.
Availability
Cloudflare customers on Pro and Business plans can enable the feature through the AI Crawl Control section of their dashboard. SaaS providers using Cloudflare for SaaS can activate Markdown conversion across all custom hostnames or selectively on a per-hostname basis.
A Growing Space
Cloudflare is not alone in recognizing the value of Markdown for AI workflows. WordPress developer Joost de Valk has released a plugin called Markdown Alternate that takes a similar approach, while services like Firecrawl and Fasterize EdgeSEO offer commercial alternatives for crawling and normalizing web content for LLM pipelines. De Valk has noted the two approaches can complement each other , his plugin offering depth and control on individual WordPress sites, while Cloudflare delivers broad, zero-effort coverage across the wider web.
For development teams building AI-powered pipelines that pull from live web content, some form of HTML-to-Markdown conversion is rapidly becoming standard practice. Cloudflare’s edge-native, switch-it-on approach removes what little friction remains ,making the entire web, in theory, agent-ready by default.
Read also: Ghana launches crypto regulatory sandbox to test digital asset services




