How to convert Markdown to PDF: five methods compared

There are five common ways to turn Markdown into a PDF: Pandoc, an editor extension such as VS Code’s Markdown PDF, your browser’s print dialog, an online converter, or a print-focused tool such as Cropmark. They differ most on page breaks, page numbers and setup effort.

At a glance

MethodSetupPage numbersPage breaksBest for
Pandoc with LaTeXInstall Pandoc and a TeX distributionYesGood, with LaTeX controlBooks, papers, automation
VS Code extensionInstall an extensionThrough settingsBrowser-styleFiles you already edit in VS Code
Browser print dialogNoneThe browser’s own, with URL and dateOften splits tables and codeQuick drafts
Online convertersNoneVariesVariesOne-off conversions
CropmarkNoneYes, “3 / 12”Rows, code and diagrams never splitDocuments you send to someone

Pandoc: the most control

Pandoc converts Markdown to PDF through LaTeX, which gives book-quality typography, citations and full control over the page. pandoc report.md -o report.pdf is all it takes once it is installed.

The cost is setup: Pandoc plus a TeX distribution is a large install, and changing the look means editing LaTeX templates. It is the right choice for theses, books and automated pipelines.

An editor extension: convenient if you live in the editor

Extensions such as Markdown PDF for VS Code export the file you are editing, usually through a bundled or installed Chromium. Headers, footers and page numbers are configured in the extension’s settings.

They suit people who already write in that editor. Page-break handling is the browser’s default, so long tables and code blocks can still split.

The browser print dialog: zero setup, least control

Open a rendered Markdown page and choose Print › Save as PDF. It works everywhere, but the browser adds the page address and date unless you turn headers off, and it breaks pages wherever the paper ends — often in the middle of a table row or a code block.

Online converters: quick, but check three things

There are dozens of online Markdown to PDF converters. Before relying on one, check whether it adds a watermark, whether the text in its PDF can be selected (some produce an image of the page, which is blurry and not searchable), and where your document goes when you convert it.

Cropmark: print-ready documents without setup

Cropmark is built for the document you are about to send: numbered pages, headings kept with their text, rows and code blocks never split, PDF bookmarks and a to-scale preview, with Mermaid and LaTeX built in. Your text stays in your browser until you download.

It formats one document at a time with three themes. If you need custom LaTeX typography, citations or batch conversion, Pandoc is the better tool.

Which one to use

  • Sending a document to someone

    Cropmark, for page numbers and clean breaks without setup.

  • A thesis or a book

    Pandoc with LaTeX.

  • Hundreds of files in a pipeline

    Pandoc, or the Cropmark API for print-style output.

  • A quick look at a draft

    The browser print dialog is enough.

Questions

What is the easiest way to convert Markdown to PDF?

An online tool that needs no installation: paste the Markdown, check the preview, download. Cropmark adds page numbers and clean page breaks by default.

How do I convert Markdown to PDF with page numbers?

Pandoc adds them through LaTeX; in Cropmark they are on by default. See page numbers, header and footer.

Why is the text in my PDF not selectable?

The converter drew the page as an image. Tools that render real text — Pandoc, Chromium-based tools, Cropmark — produce PDFs you can search and copy.

Try it on your own document

Paste your Markdown, check the page, download the PDF. Free, with no sign-up.

Open Cropmark

Published . Updated .