md2 the world's printer for documents
Write Markdown once. md2 prints it to polished PDF, images and HTML — with right-to-left Arabic that actually works, math, and highlighted code. For people in the studio, and for AI agents over MCP.
No account. Nothing to install.
Try it here
Edit the text and watch the page print beside it. The engine that runs on the server is running in your browser right now.
Q3 report — Noor Co.
18% growth this quarter with the new /v1/convert API shipped.
| Metric | Target | Actual |
|---|---|---|
| Documents printed | 10,000 | 11,240 |
| Median conversion | 1.2 s | 0.31 s |
| User satisfaction | 90% | 96% |
Highlights
- PDF printing with embedded Arabic fonts
- Per-paragraph direction detection
- Inline math such as
- Digital signatures (next quarter)
npx md2 convert report.md --to pdfThis paragraph is English and keeps its direction — وهذه الفقرة عربية تنقلب تلقائياً لكل فقرة على حدة.
The md2 rule: write once, print to any format — without a single character breaking.
Arabic from the root, not patched on
Direction is detected per paragraph. Punctuation lands where it belongs, code stays left-to-right inside Arabic text, and numbers never flip.
Per-block direction
An Arabic paragraph and an English one in the same document, each in its own direction.
Real Arabic fonts
Self-hosted fonts embedded in the PDF, so it looks the same on the reader's device.
Math and code
KaTeX for formulas and syntax highlighting for 30+ programming languages.
A mixed paragraph
md2 2.0 shipped on Cloudflare Workers on 10 October 2026, printing PDF, PNG and HTML.
وهذه فقرة عربية تحتفظ باتجاهها الخاص من اليمين إلى اليسار.
const pdf = await md2.convert(doc);A printer for AI agents
Agents write Markdown natively. md2 is where it turns into a file you can send: a REST API and an MCP server today, and an Arabic writing agent in the studio.
Formats
What works today, and what is coming. No empty promises.
- PDF Print-ready PDF with margins and pagesLive
- PNG PNG image for sharingLive
- HTML Standalone HTML with its fontsLive
- MD Normalised MarkdownLive
- JSON Document tree (JSON)Live
- TXT Plain textLive
- DOCX Word (DOCX)Live
- PPTX Slides (PPTX)Live
- EPUB E-book (EPUB)Live
- XLSX Excel sheets (XLSX)Live
- CSV CSV tablesLive
- TEX LaTeX sourceLive
- SLIDES 16:9 slides as PDFLive
One line from the terminal
A public REST API with fair guest limits. Send Markdown, get the file back.
curl "https://md2.dev/v1/convert?format=pdf&theme=blue" \
-H "Content-Type: text/markdown" \
--data-binary @report.md -o report.pdf