Export Markdown to clean HTML — fragment, styled, or full document. Zero dependencies. Powered by CapabilityBase Runtime.
AI agents generate Markdown. APIs consume HTML. Existing solutions are either heavy (hundreds of KB) or unsafe (XSS vulnerabilities). This Capability gives you a zero-dependency, XSS-safe Markdown-to-HTML exporter with three output modes — for embedding, styling, or saving as standalone documents.
Raw HTML with no wrapper. Perfect for embedding in existing pages or API responses.
HTML wrapped in a styled <div> with base CSS. Ready for emails, documents, or previews.
Complete HTML page with <html>, <head>, and embedded CSS. Save as .html file.
| ID | markdown.toHTML |
| Version | 1.0.0 |
| Status | stable |
| Category | Markdown |
| Contract | deterministic, no side effects, local, no AI, XSS-safe |
| Runtime | Browser, Node, Edge, Worker |
| Consumes | markdown |
| Produces | html |
AI is probabilistic. Your tools shouldn't be.
Yes — choose between an HTML fragment, an inline-styled document, or a complete page with <head> and CSS.
Yes. The inline-styled export uses table-safe CSS widely compatible with email clients.
Yes — syntax-highlighted code blocks are preserved in the exported HTML.
Deploy this tool on Vercel · Ship faster with Cursor · Your static site on Cloudflare