Cloudflare Workers AI toMarkdown vs md2rich 2026
Cloudflare shipped two Markdown-conversion updates in July 2026: a text output option for the Workers AI toMarkdown method on July 10, and the "Markdown for Agents" content-negotiation feature on July 13 that preserves HSTS, CSP, and Content-Signal headers from your origin. For a Markdown-first writer who pastes into LinkedIn, X Articles, and Substack, the question is whether either of these replaces md2rich — the client-side converter that turns Markdown drafts into the rich text those composers actually accept. The short answer is no, they solve different problems, and this guide shows where each one fits in a 2026 writing workflow.
Workers AI toMarkdown is for ingesting documents into Markdown. It converts PDFs, scanned images, Office files, and HTML pages into structured Markdown that an LLM or a RAG index can parse. md2rich is for publishing Markdown drafts into rich-text composers. One runs on Cloudflare's edge and the other runs in your browser. The two are complementary, not competitive, and the right combination depends on which direction your Markdown is moving.
What Cloudflare shipped in July 2026
Cloudflare's Workers AI toMarkdown method has been live since 2024, but the two July 2026 releases made it production-grade for the kind of pipelines Markdown writers actually need. Both are documented on the Cloudflare developer changelog and confirmed against the official Markdown Conversion docs page.
| Feature | Released | What it does |
|---|---|---|
| output.format = "text" | July 10, 2026 | Returns plain text with Markdown syntax stripped, useful for indexing or pre-LLM cleaning. Default stays "markdown". |
| Markdown for Agents | July 13, 2026 | Origin Content Signals: HTML responses return Markdown when the request sends Accept: text/markdown, with HSTS, CSP, Set-Cookie, and Content-Signal headers preserved. |
| GIF and BMP to Markdown | Earlier in 2026 | Adds raster image formats to the converter so screenshots and scanned receipts convert without pre-processing. |
| Browser Rendering /markdown endpoint | Available since 2025 | Renders a JS-heavy page in a real browser, then converts the rendered DOM to Markdown. Use for SPAs. |
The pricing page confirms toMarkdown is free for most format conversions. Image conversion can call Workers AI models for object detection and summarization, which may exceed the free tier and bill per request — but PDF and HTML conversions stay free as of July 2026.
What md2rich does in 2026
md2rich is a single-page web app: open the URL, paste Markdown into the left pane, the right pane renders rich text, click Copy rich text, paste into LinkedIn / X Articles / Substack / Notion / Bluesky. The conversion runs in your browser using the standard ClipboardItem API with HTML and plain-text variants, so the rich-text payload lands in the platform's composer already formatted as bold, italics, headers, links, and lists.
Because it runs in your browser tab, no network request carries the draft. There is no API key, no login, and no server-side processing. The same property makes it useless for batch processing 200 PDFs — but that is not the use case md2rich is built for.
Side-by-side: Workers AI toMarkdown vs md2rich
| Dimension | Workers AI toMarkdown | md2rich |
|---|---|---|
| Direction | Document → Markdown | Markdown → rich text |
| Where it runs | Cloudflare edge (Worker) | Your browser tab |
| Network | Document is POSTed to Cloudflare | Zero network — local paste only |
| Cost | Free for most formats, billed on heavy image batches | Free, no rate limits |
| Latency | ~100–400ms per file (edge round trip) | Instant (sub-frame) |
| Best input | PDF, Office, image, raw HTML page | A Markdown draft you have already written |
| Best output | Markdown string or plain text for an LLM/RAG | Rich text on the OS clipboard for pasting into a composer |
| Auth | Cloudflare account + API token | None |
| Privacy | Document reaches the edge (encrypted in transit, processed, discarded) | Draft never leaves the browser |
| Limits | Per-account Workers AI quota | Clipboard size cap (~50MB on most browsers) |
The columns that matter most are Direction and Where it runs. If your starting artifact is a PDF or a screenshot, Workers AI is the only option — md2rich cannot read a PDF. If your starting artifact is a Markdown draft and your target is a social composer, md2rich is the only option — Workers AI toMarkdown outputs Markdown or text, not the HTML-flavored clipboard payload that LinkedIn's composer accepts.
Five writer workflows that combine both
The cleanest 2026 setup uses each tool inside its lane. Five concrete workflows show the division of labor.
1. Ingest research PDFs into a Markdown research vault
Drop a folder of PDFs into an R2 bucket, write a Worker that iterates the bucket and calls env.AI.toMarkdown() on each file, write the Markdown to a second bucket or feed it directly into a Vectorize index. The Worker runs on the same edge as the bucket, so 200 PDFs convert in under a minute and cost nothing on the free allocation for text-based PDFs. This is a Markdown-first vault built without ever opening a desktop OCR tool.
// workers-ai-tomarkdown-pipeline.ts
export default {
async fetch(req, env) {
const form = await req.formData();
const file = form.get('file');
const md = await env.AI.toMarkdown(
{ name: file.name, blob: file },
{ conversionOptions: { output: { format: 'markdown' } } },
);
return new Response(md, { headers: { 'content-type': 'text/markdown' } });
},
};
2. Convert screenshots of paywalled articles
Screenshot a Bloomberg or FT article (your subscription, your screenshot), drop the PNG into the same Worker. toMarkdown with the image path runs object detection and OCR under the hood and returns a Markdown approximation you can paste into a notes app. Useful for the "I read this three weeks ago and need the cite" workflow. Note: this is the path that may exceed the Workers AI free tier if you batch-process dozens of images per day.
3. Daily Markdown draft → LinkedIn longform
This is the workflow md2rich exists for and where Workers AI is the wrong tool. Open your editor (Obsidian, iA Writer, VS Code), write a 1,200-word Markdown draft with one H1, three H2s, three links, and one bold callout. Open md2rich, paste the Markdown into the left pane, click Copy rich text, switch to LinkedIn, paste into the longform composer. The bold, italics, headers, and links survive the round trip; the LinkedIn AI detector (covered in the July 13 detector roundup) sees your sentence patterns, not a pasted-HTML payload.
4. Markdown for Agents on your own Cloudflare zone
If you publish a documentation site on Cloudflare Pages, enable the Markdown for Agents feature (Cloudflare Fundamentals → Content Signals). Any HTTP client — including GPTBot, ClaudeBot, and the LLM scrapers in your analytics — that requests the page with Accept: text/markdown receives the Markdown version directly. You do not need a Worker; the conversion happens at the edge, and the security headers your origin sets (HSTS, CSP, X-Frame-Options, Set-Cookie, CORS) are preserved on the converted response. The default Content-Signal when you do not set one is ai-train=yes, search=yes, ai-input=yes, which tells AI crawlers the content is open for training and search use.
5. Markdown newsletter → Substack without losing code blocks
Substack's composer accepts pasted HTML from ClipboardItem the same way LinkedIn does. The same md2rich paste step (write in Markdown → md2rich → paste into Substack) preserves fenced code blocks and inline code formatting, which the Substack markdown shortcut loses. Workers AI is irrelevant here; you are not converting a document, you are publishing one.
The privacy line that decides the tool
Workers AI toMarkdown runs on Cloudflare's edge and the document is POSTed to the Workers AI binding inside a Worker. Cloudflare documents that conversion data is processed and discarded, and the edge network is encrypted in transit. For a PDF you wrote, a screenshot of your own work, or a public article, that is fine. For an unpublished draft containing source material you have not yet cited, the route to the edge is one more party in the trust chain — and there is no way to disable it without leaving Workers AI entirely.
md2rich's zero-upload property is the same property that lets you paste a draft containing three paragraphs you have not yet sourced, an unreleased product name, or a personal anecdote you do not want logged. The conversion runs in your browser tab using the standard DOM and ClipboardItem APIs; no fetch() call leaves the page. If your threat model includes "the platform I am pasting into might scrape my drafts," md2rich reduces that surface; Workers AI does not.
Pricing in July 2026
| Item | Cost |
|---|---|
| Workers AI toMarkdown (PDF, HTML, Office) | Free, included in Workers AI free tier |
| Workers AI toMarkdown (image: PNG, JPG, GIF, BMP) | Free up to Workers AI monthly limit, then per-image billed against object-detection models |
| Browser Rendering /markdown endpoint | Free for the first 100 requests/month, then per-request billed |
| Markdown for Agents (zone-level content negotiation) | Free for Pro+ zones, included with the Workers Paid plan |
| md2rich | Free, no rate limits, no account |
Both tools are free for the writer workflow they were built for. Workers AI's free tier is enough for a personal RAG of a few hundred PDFs a month; md2rich has no tier at all because there is nothing to bill against (no API key, no server).
When to pick which
Pick Workers AI toMarkdown when you are turning PDFs, scanned images, or HTML pages into structured Markdown for an LLM, RAG index, or local note archive. The edge round trip is fast, the cost is free for text-based formats, and the new text output option is the cleanest way to strip Markdown syntax before chunking for embeddings.
Pick md2rich when you are publishing a Markdown draft into LinkedIn, X Articles, Substack, Bluesky, Notion, or any other rich-text composer that accepts pasted HTML. The paste step runs in your browser, the formatting survives the round trip, and the draft never reaches a server.
For most Markdown-first writers, the two are complementary parts of the same stack: Workers AI on the ingestion side (PDFs in → Markdown out for an LLM to read) and md2rich on the publishing side (Markdown draft → rich text on the clipboard for a human reader). The July 2026 releases closed the two gaps that made this stack incomplete — text output for LLM preprocessing and Markdown for Agents for AI crawler access — without changing either tool's primary purpose.
If you write in Markdown and publish to social, try md2rich first — the conversion is local, the paste is one click, and your draft never reaches a server. If you maintain a research archive that needs to become Markdown for an LLM, point a Worker at your R2 bucket and call env.AI.toMarkdown() on every new file. The two tools together are the cleanest 2026 split: ingestion on the edge, publishing in the browser, and your draft never crosses the wrong boundary for either step.
Try md2rich — client-side Markdown to rich text
Open the editor, paste your Markdown, click Copy rich text, paste into LinkedIn, X Articles, Substack, Bluesky, or Notion. The conversion runs in your browser tab using the standard ClipboardItem API; no upload, no account, no API key. Bold, italics, headers, links, fenced code blocks, and inline code all survive the round trip.