Markdown to PDF converter

Turn a .md file into a clean, paginated PDF with selectable text and working links. Rendered by your browser, so nothing is uploaded.

Page setup

In the dialog, choose Save as PDF as the destination. Untick “Headers and footers” for clean margins.

How to convert Markdown to PDF

  1. Add your Markdown. Paste it, open a .md file, or press Export → PDF in the editor to bring your document here.
  2. Set up the page. Paper size, margins, theme and text size update the preview below as you change them.
  3. Control page breaks. Insert <!-- pagebreak --> on its own line, or start each H1 or H2 on a new page.
  4. Save. Press Save as PDF and pick “Save as PDF” in the print dialog.

Why print instead of a server converter?

Server tools upload your document and usually rasterise or re-typeset it. Printing from the browser keeps text as real text (searchable and copyable), keeps hyperlinks clickable, draws diagrams as vectors and keeps confidential documents on your machine. The trade-off is that the browser’s print dialog is one extra click.

Themes

  • Clean sans: compact, modern, good for specs and handouts.
  • Report serif: a book-like serif body with generous line spacing for proposals and essays.
  • GitHub: looks like a README on github.com, useful for sharing repository docs.

Command-line alternatives

For automated builds, Pandoc (pandoc in.md -o out.pdf, needs a LaTeX engine) or md-to-pdf on npm (uses headless Chrome) produce PDFs in CI. For a one-off document this page is faster.

Questions people ask

How do I convert Markdown to PDF?
Paste or open your .md file, pick a paper size and theme, then press “Save as PDF”. In the print dialog choose “Save as PDF” (Chrome, Edge), “PDF” (Safari/macOS) or “Microsoft Print to PDF” (Windows).
Is my file uploaded to a server?
No. The Markdown is rendered and printed by your own browser, so the text never leaves your device. That also means the PDF has real, selectable text and working links.
How do I add a page break?
Put <!-- pagebreak --> on its own line where the new page should start, or turn on “New page before each H1/H2”.
Why is there a date and URL in the PDF margins?
Those are the browser’s headers and footers. Untick “Headers and footers” in the print dialog’s “More settings” to remove them.
Do code blocks, tables and Mermaid diagrams print?
Yes. Code keeps its syntax colours, tables avoid splitting rows across pages, and Mermaid diagrams print as crisp vector graphics.
Why are background colours missing?
Some browsers skip backgrounds when printing. Tick “Background graphics” in the print dialog to keep code-block shading.

Related tools