Free MD2PDF
English

Print Markdown: typeset in your browser.

Paste or drop a Markdown file and press Print: the printer gets a typeset PDF with page numbers and page breaks where you want them, not a web page.

Source · .md Drop a .md file or images here
Proof A4 · page breaks follow the downloaded PDF Live
PDF engine on standby
About Free MD2PDF

Print Markdown

Printing Markdown usually means printing something else: the raw text with its asterisks and hash marks, or a web page rendered from it, with the browser’s headers, cut-off code blocks and page breaks through the middle of a table. The result also changes from one computer to the next, because it depends on the fonts installed there.

The Print button on this page prints the PDF that the typesetting engine makes from your Markdown, the same file Download PDF saves. Its fonts travel with it, so the pages come out the same on any computer and any printer: headings, tables, highlighted code, Mermaid diagrams, formulas, and Chinese, Japanese or Korean text included.

How to print a Markdown file

  1. Open the file. Drop the .md file onto this page, use Open, or paste the Markdown into the editor.
  2. Set up the pages. Under Layout, choose the paper size, margins and page numbers; put \pagebreak on a line of its own wherever a new page should start.
  3. Press Print. Press Print, or Ctrl+P (⌘P on a Mac). The print dialog opens with the typeset PDF.
  4. Choose the printer. Pick your printer, or Save as PDF, and print.

Page breaks you control

The engine breaks lines and pages the way a book is set, and you can add your own breaks: a line with \pagebreak, \newpage or <!-- pagebreak --> starts a new page, and New page per H1 under Layout gives every chapter its own. The preview marks each break with a dashed line. Headers and footers, a cover page and templates for reports, papers, letters and résumés are there when a printout needs to look official.

Diagrams and every script, on paper

Mermaid diagrams are printed as sharp vector graphics, scaled to fit the page rather than cut off at its edge. Chinese, Japanese, Korean, Cyrillic, Greek, Arabic and other scripts are set in matching Noto fonts that come with the page, so nothing turns into empty boxes because a font is missing on the computer you print from.

Printing Markdown from VS Code or on a Mac

VS Code has no print command for Markdown. Its preview cannot be printed directly; the usual workaround is an extension such as Markdown PDF, which exports a PDF for you to print. On a Mac, TextEdit opens a .md file as plain text and prints it with the Markdown symbols showing. Either way, dropping the file onto this page and pressing Print is quicker: nothing to install, and the page breaks are set properly.

Frequently asked questions

How do I print a Markdown file?

Drop the file onto this page (or paste its text), check the preview and press Print. The print dialog shows the typeset pages, and you print as you would any document.

How do I print Markdown from VS Code?

VS Code cannot print its Markdown preview itself. Install an export extension such as Markdown PDF and print the PDF it writes, or drag the file from VS Code’s explorer onto this page and press Print.

How do I print a Markdown file on a Mac?

macOS has no built-in app that formats Markdown for printing: TextEdit prints the raw text. Drop the file onto this page in Safari, Chrome or Firefox and press Print. In Safari and Firefox the PDF opens in a new tab; print it from there with ⌘P.

Why did a new tab open instead of the print dialog?

Safari, Firefox and phone browsers do not reliably print a PDF from inside another page, so the PDF opens in a tab of its own and you print it from there. It is the same file, so the printout is identical. Chrome and Edge on a computer open the print dialog directly.

How do I add a page break?

Put \pagebreak (or \newpage, or <!-- pagebreak -->) on a line of its own. Two breaks in a row, or a break right before a heading that already starts a page, never leave a blank page.

Will it look the same on another computer?

Yes. The page prints a PDF with its fonts embedded, not a web page laid out by your browser, so the line and page breaks do not change with the computer, the browser or the printer.

Guides and use cases

ChatGPT to PDF

save a ChatGPT answer as a clean PDF with its tables, code and formulas

DeepSeek to PDF

export DeepSeek answers, formulas included, as a PDF

Claude to PDF

turn Claude answers and Markdown artifacts, Mermaid diagrams included, into a PDF

Gemini to PDF

save Google Gemini responses as a typeset PDF

Mermaid to PDF

diagrams that render as vectors, with selectable text, in the PDF

README to PDF

a GitHub README.md as a PDF, with tables, code and diagrams

CLAUDE.md to PDF

agent instruction files and Claude Code plans as a readable PDF