Markdown to PDF
Print-ready PDF with margins, page breaks and embedded fonts, printed by Chromium on Cloudflare's edge.
How it works
- Write or paste Markdown in the studio, or send it from a terminal or your agent.
- The md2 engine reads the document once and detects each paragraph's direction.
- A PDF file is built and downloads right away.
When to use it
- Reports and quotes ready to print
- Papers with KaTeX formulas
- Formal documents with a cover from front matter
Right-to-left Arabic
Direction is detected per paragraph and the Arabic font is embedded, so the file looks the same on every device.
Try it now
curl
curl -X POST https://md2.dev/v1/convert \
-H "Content-Type: application/json" \
-d '{"markdown":"# Report\n\nHello from md2","format":"pdf"}' \
-o document.pdf MCP tool
{
"tool": "convert",
"arguments": {
"markdown": "# Report\n\nHello from md2",
"format": "pdf"
}
} Common questions
- Do I need an account?
- No. Guests can convert up to 10 PDFs a minute, with documents up to 1 MB.
- Do links and headings survive?
- Yes: links are clickable and headings become the PDF outline.
- What about Mermaid diagrams?
- They are drawn on the server before printing and land in the PDF as vectors; a broken diagram shows its source and a warning.