Convert Markdown to PDF
Markdown to PDF renders a CommonMark .md file to a PDF with WeasyPrint, using a font stack that covers Chinese, Japanese and Korean text. The file must be UTF-8.
Drag and drop files here, or click to choose
Accepts MD · up to 500.0 MB per file · up to 20 files at once
You can also paste a file with Ctrl/Cmd+V, or from the clipboard menu.
Markdown to PDF parses CommonMark with `pulldown_cmark`, wraps it as HTML (including a Noto Sans CJK font stack), and prints that HTML with WeasyPrint. Upload a `.md` file. The API also accepts a ZIP of Markdown plus assets; the website file picker only lists `.md`.
This is not a Pandoc replica and not a slide engine. Tables, strikethrough and task lists render; other GitHub-specific extras such as footnotes and emoji shortcodes are not converted. Pages are A4 with 2 cm margins. JavaScript in fenced HTML is not executed.
Non-`.md` / non-`.zip` names are rejected. UTF-8 is required for the Markdown path. Encrypted PDFs are the wrong input; start from Markdown.
If you already have HTML, HTML to PDF skips the CommonMark step. If you have a PDF and want Markdown out, that is PDF to Markdown, the other direction.
The built-in stylesheet sets 11 pt body text with a 1.6 line height, dark gray (`#111`) text, block quotes in a lighter gray (`#444`), and images capped at the page width. The wrapper also looks at your text and sets the document language to English, Simplified or Traditional Chinese, Japanese, Korean, Arabic, Thai or Hindi, and Arabic text is laid out right to left.
For a ZIP, the converter renders one Markdown file only: `index.md` at the archive root if present, otherwise the first `.md` it finds while walking the folders. The generated HTML is saved at the root of the extracted folder, so image paths in the Markdown resolve relative to that root, not to the subfolder the `.md` sits in.
The output is named after your upload, so `release-notes.md` returns `release-notes.pdf`.
Features
- CommonMark (`pulldown_cmark`) then WeasyPrint
- CJK-capable HTML wrapper; not Pandoc
- Website accepts `.md`; API also allows a ZIP
- Anonymous API at /api/v1/convert/markdown/pdf
When to use this tool
- Print a README or spec to PDF
- Turn OCR Markdown into a printable PDF
- Share a CommonMark note as a paginated file
- Archive meeting notes with task lists and tables as a fixed document
- Hand a CJK or Arabic note to someone who does not use Markdown tools
How do I convert Markdown to PDF?
- Upload a UTF-8 `.md` file.
- Click Process. There are no theme or paper fields on this page.
- Download the PDF.
- Check headings, lists, and CJK glyphs. Complex HTML embeds may not print.
- If images are missing, switch to the API with a ZIP that holds `index.md` and the image files, using paths relative to the archive root.
- If you need a different look (paper size, fonts, colors), convert to HTML yourself, add your own CSS, and use HTML to PDF instead; this page has no styling options.
Limits and edge cases
- No Pandoc filters, no JS, no theme picker
- Website picker does not expose ZIP even though the API allows it
- Must be UTF-8 Markdown
- A ZIP renders exactly one Markdown file
- Page size, margins and fonts are fixed by the built-in stylesheet
- Upload limit on this website: 500 MB per file, sent in chunks above about 95 MB. A single direct API request body is capped at 100 MB.
Examples
- A UTF-8 Markdown heading and list usually become a short PDF with those styles
- A .txt renamed to .md may pass the extension check but still need valid UTF-8
- A `notes.md` with a pipe table and a `- [x]` task list prints the table and the checked item, because both extensions are enabled
- A footnote written as `[^1]` is not converted by the parser options, so it should appear as literal text; use inline notes instead
Privacy for this tool
Files are uploaded over HTTPS, processed in memory or a short-lived temporary directory on our servers, and deleted when your result is ready. We do not keep copies for later browsing, training, or advertising profiles. See the Privacy Policy for retention details and AdSense cookie disclosures.
Frequently asked questions
- Does it run Mermaid or JS widgets?
- No. WeasyPrint prints the HTML from CommonMark. Scripts do not run.
- Why was my file rejected?
- The name must end in .md or .zip. Other extensions are rejected as an unsupported file type.
- Can I send OCR Markdown here?
- Yes if it is a .md file. The Markdown output of OCR PDF goes straight in; the PDF is built from that text, not from the scan.
- Is GitHub Flavored Markdown fully supported?
- Partly. Tables, strikethrough and task lists are enabled on top of CommonMark; footnotes and emoji shortcodes are not.
- What page size and margins does the PDF use?
- A4 with 2 cm margins and 11 pt body text. These are fixed; there is no field to change them on this page.
- Does Chinese, Japanese, Korean or Arabic text work?
- The wrapper detects the dominant script and sets the document language, and the font stack lists CJK, Arabic, Thai and Devanagari families. Whether a glyph prints still depends on a matching font being installed on the server, so check the output for empty boxes.
- How do I include images?
- Send a ZIP through the API with the Markdown file and the images inside, and reference them by relative path from the archive root. The web picker lists only .md files.
- If my ZIP has several Markdown files, which one is used?
- Only one: index.md at the root when it exists, otherwise the first .md found while searching the folders. To print several files, merge them into one Markdown file first.
- What error means the upload is not valid text?
- A plain .md upload that is not valid UTF-8 is rejected with the message that the Markdown file is not valid UTF-8 text. Re-save the file as UTF-8 and try again.
Last updated:
Call this from code
Every tool on this site is a plain REST endpoint - no account or API key needed for anonymous use. Built for AI agents and developers as much as for browsers.
curl -X POST "https://pdf123.xyz/api/v1/convert/markdown/pdf" \
-F "[email protected]" \
-o output.pdfAlso available as an MCP tool for agent clients that speak Model Context Protocol (JSON-RPC 2.0 over POST /mcp). Full API reference
Use it from an AI agent
SkillClaude Code, Codex, Cursor and other AI agents can run Markdown to PDF for you with this skill: /skills/pdf123-markdown-to-pdf.md
Files are used only for this processing job and deleted automatically afterward.