guidecomparison16 min read

Markdown to PDF: The Complete Guide (8 Methods Compared, 2026)

Eight methods, one .md file, eight very different PDFs. The honest comparison nobody else publishes — with the commands, the trade-offs, and the templates.

Mohammed AgratUpdated May 26, 2026

Eight ways to turn a markdown file into a PDF. The same .md goes in. Eight very different PDFs come out. This is the honest comparison nobody else publishes — the commands, the trade-offs, the typography, the bills.

TL;DR — markdown to PDF in one paragraph

Markdown to PDF is the process of rendering a .md file into a paginated PDF document, usually through one of three engines: a LaTeX engine (Pandoc + TeX), a Chromium engine (browser print, md-to-pdf, mdclaudy), or a Typst engine (newer, gaining ground). The choice of engine decides almost everything about the final page — fonts, hyphenation, widow control, how tables paginate. The choice of template decides whether the PDF looks designed or generic.

  • Easiest, designed output: mdclaudy — 15 templates, no install, free tier on /tools/markdown-to-pdf.
  • Highest ceiling, hardest setup: Pandoc with the Eisvogel template.
  • Best for developers in a build: md-to-pdf on npm.
  • Best for desktop preview on Mac: Marked 2.
  • Quickest one-off, ugliest output: browser print (Ctrl+P) on a rendered .md.

A live converter lives at /tools/markdown-to-pdf — paste your markdown in, pick a template, get a PDF. No account required for the basic templates.

The eight methods at a glance

Same five-page markdown file, same body content, eight different renderers. The ranking below is for the headline question: which method ships a PDF you’d be happy to hand to a client? Adjust the ranking if your priority is reproducibility, cost, or terminal-native tooling.

#MethodBest forPriceSetupDesign
1mdclaudy· usDesigned PDF straight from markdown, no setupFree 50 docs · Pro $8/moNone — open the editor★★★★★
2Pandoc + EisvogelLaTeX-quality output if you have the patienceFree (open source)Install Pandoc, LaTeX, the template★★★★
3Pandoc (default)Quick reproducible PDFs from a build scriptFree (open source)Install Pandoc + a LaTeX engine★★★★★
4md-to-pdf (npm)Developers who want a Chromium pipelineFree (open source)npm install -g md-to-pdf★★★★★
5Marked 2Mac writers who want a desktop preview pane$13.99 once (Mac only)Buy from the Mac App Store★★★★★
6VS Code (Markdown PDF)Developers already living in VS CodeFree (extension)Install the Markdown PDF extension★★★★★
7Browser print (Ctrl+P)One-off PDFs you don't have to look at twiceFreeRender the .md in any viewer, then print★★★★
8Online convertersQuick conversion when you can't install anythingFree with limits / watermarksPaste markdown into a web form★★★★★

What “markdown to PDF” actually means

Underneath the eight tools, only three rendering engines do the real work. Knowing which engine a tool uses tells you, in advance, how the PDF will look.

LaTeX engines (Pandoc, Eisvogel)

Pandoc converts markdown to a LaTeX intermediate, then a LaTeX engine (pdfLaTeX, XeLaTeX, LuaLaTeX) typesets it into a PDF. This is the gold-standard route — proper hyphenation, real ligatures, widow and orphan control, the typography decisions Knuth and Lamport thought about for decades. The trade-off is setup: a full TeX Live install is about 4GB, and template authorship is its own craft.

Chromium engines (md-to-pdf, browser print, mdclaudy)

Renders the markdown to HTML, applies CSS, then asks a headless Chromium to print the page to PDF. Most modern markdown-to-PDF tools live here. The output ceiling is below LaTeX (no real hyphenation, no true ligatures, paginated CSS is famously rough) but the design surface is friendlier — you write CSS, not \usepackage. mdclaudy is on this engine today; a Typst-backed Print-Quality mode is on the roadmap.

Typst engines (newer)

Typst is the newest entrant — a modern reimagining of LaTeX with first-class typographic control and a far gentler authoring language. Adoption is rising fast in academic and design circles. Pandoc gained a Typst writer in 2024; mdclaudy ships a Typst engine as part of its Phase 2 roadmap.

Method 1 — Pandoc (the default route)

Pandoc is the universal document converter. It reads markdown and writes everything — PDF, DOCX, EPUB, LaTeX, HTML, ODT, RTF. For PDF output it needs a LaTeX engine present on your system.

Install Pandoc and a TeX distribution (TeX Live on Linux/macOS, MiKTeX on Windows). Then:

pandoc input.md -o output.pdf

That’s it. You will get a Computer Modern-typeset, plain academic PDF. It will look like a 1990s thesis. For anything you’d send to a client, you need a template (next method) or a custom LaTeX preamble.

Pandoc gets one thing very right: it preserves footnotes, citations, tables, math, and code blocks faithfully when the template knows about them. It gets one thing very wrong for non-developers: install friction. A clean TeX Live install pulls 4GB of LaTeX packages, and the first time a missing package errors you out mid-export, you will question your life choices.

Method 2 — Pandoc + Eisvogel (the “real” Pandoc)

Eisvogelis the de-facto Pandoc PDF template. Built by Pascal Wagler, it’s the most-starred Pandoc LaTeX template on GitHub. It gives you a polished, code-block-aware, title-page-having PDF in one command.

Install (after Pandoc + TeX Live are in place):

curl -L https://github.com/Wandmalfarbe/pandoc-latex-template/releases/latest/download/Eisvogel.tar.gz -o Eisvogel.tar.gz
tar -xzf Eisvogel.tar.gz
mkdir -p ~/.pandoc/templates
mv Eisvogel-*/eisvogel.latex ~/.pandoc/templates/

pandoc input.md -o output.pdf \
  --from markdown --template eisvogel \
  --listings

The first run will probably fail on a missing LaTeX package (fvextra, footnotebackref, mdframed are the usual culprits). Install via tlmgrand re-run. Once Eisvogel is working, the PDF quality is genuinely impressive — and it’s free.

Where Eisvogel still loses to a designed-template tool: layout variety. You get Eisvogel’s one good look. To ship a proposal next to a research report next to a résumé, you need three different templates and three sets of YAML metadata.

Method 3 — md-to-pdf (npm, Chromium under the hood)

md-to-pdf by Simon Haenisch is the most-used Node-based converter. It renders markdown to HTML with markdown-it, applies your CSS, and prints with headless Chromium via Puppeteer.

npm install -g md-to-pdf
md-to-pdf input.md

# with a custom stylesheet
md-to-pdf --stylesheet ./style.css input.md

Setup is two minutes, the install is ~100MB (most of it Chromium), and the output is whatever your CSS describes. For developers who don’t want LaTeX in their life, this is the path. It’s also the engine you reach for when you need to script PDF generation inside a CI pipeline.

Limitations: page breaks are CSS page breaks, which means rough edges on long tables; no native footnote support unless you wire it through a markdown-it plugin; KaTeX needs an extra render pass. None are showstoppers, all are weekends you weren’t planning to spend.

Method 4 — Browser print (Ctrl+P)

The original markdown-to-PDF method. Open the rendered .md in your browser — via VS Code preview, a GitHub gist, an Obsidian export, anything — and hit Ctrl/Cmd+P. Save as PDF. Done.

The output will look like a webpage saved as a PDF, because that is exactly what it is. Default browser fonts, web margins, page breaks landing wherever Chromium chooses. For one-off PDFs nobody will look at twice, it’s fine. For anything you’re proud of, it isn’t.

Method 5 — VS Code (Markdown PDF extension)

The Markdown PDF extension by yzane wraps a Chromium printer inside VS Code. Right-click a .md file, choose Markdown PDF: Export (pdf), get a PDF. It’s the same engine as browser print, with slightly better defaults and a configurable CSS file.

Good if you already live in VS Code and want a one-keystroke export for documentation. Not good if you want anything more designed than a cleaned-up GitHub README.

Method 6 — Marked 2 (Mac desktop)

Marked 2 is a Mac-only $13.99 preview-and-export app that watches a .md file on disk and re-renders it as you edit. It ships about a dozen built-in styles (a couple actually good) and exports to PDF, HTML, RTF, and DOCX.

It’s the favorite of a generation of Mac writers because of how well it pairs with their text editor of choice — write in BBEdit, Sublime, or Vim; watch Marked 2 update in real time. The PDF output is better than the browser-print path, weaker than mdclaudy or Eisvogel.

Method 7 — mdclaudy (designed templates, no install)

mdclaudy is the tool we build — disclosure is upfront. The premise: markdown is the source of truth; the export is a designed PDF. The pipeline is a Chromium engine today, hardened for long documents (chunked rendering up to 500 pages, real TOC page numbers, font subsetting), with a Typst engine coming in Phase 2 for true print-quality output (real ligatures, hyphenation, widow/orphan control, PDF/A archival).

The reason to use mdclaudy over Pandoc + Eisvogel is the same reason people use Figma over PostScript: you don’t want a black-belt skill, you want a designed page. Fifteen templates ship today — Editorial, Manuscript, Research Report, Whitepaper, Sales Proposal, Academic Paper, Thesis, Résumé, Legal Brief, Magazine, Newspaper, Zine, Memo, Corporate, Technical Report. See the full set at markdown PDF templates.

The reason notto use mdclaudy: you need the PDF generated from a CI script with no human in the loop, you’re shipping a thousand of them, or you have a LaTeX template you’ve already invested in. For those, Pandoc + Eisvogel or md-to-pdf are the right call.

Method 8 — Online converters

The EMD pages — markdowntopdf.com, CloudConvert, Zamzar— paste markdown into a form, click Convert, download. They mostly use a Chromium or Pandoc engine in the background. The catches: file-size limits, watermarks on free tiers, your text is uploaded to a server you don’t control, and the output is generic. Useful when you can’t install anything; not where the work lives.

For the no-watermark angle specifically, see free markdown to PDF, no watermark — there are a handful of genuinely free options.

Same markdown, eight outputs

The single most useful exercise when picking a method: write one .md file, run it through all eight, lay the PDFs side by side. The differences are not subtle. Pandoc gives you a thesis. Eisvogel gives you a polished report. md-to-pdf gives you whatever your CSS describes. Marked 2 gives you a clean two-column document. mdclaudy gives you a designed page. Browser print gives you a webpage-shaped PDF.

The choice of engine decides almost everything about the final page. The choice of template decides whether it looks designed or generic.

Which one should you use?

The honest decision matrix:

  • You write one PDF a month and want it to look designed: mdclaudy. The free tier covers it.
  • You ship dozens of PDFs from a script: md-to-pdf, or Pandoc + Eisvogel if you want the LaTeX ceiling.
  • You’re writing a thesis or academic paper: Pandoc + a journal’s LaTeX template (most journals provide one). For shorter academic work, mdclaudy’s Academic Paper template.
  • You already live in VS Code: the Markdown PDF extension for quick exports; mdclaudy for the moments that need to look designed.
  • You’re on Mac and want a desktop preview while you write: Marked 2.
  • You can’t install anything: mdclaudy in the browser, or an online converter as a last resort.
  • You hate yourself: browser print.

When the output goes wrong

Every method on this list breaks in characteristic ways. Tables overflow page margins. Code blocks lose syntax highlighting. Page breaks land mid-image. Custom fonts fail to embed. KaTeX renders as raw $\frac{a}{b}$. Footnotes disappear. We wrote a full diagnostic guide for these: markdown to PDF formatting issues — fix every common bug. The structural fix, across all eight tools, is to use a designed template that knows about pagination instead of asking a browser to guess.

If your source is in Notion

The Notion-to-PDF complaint is a category of its own. The shortest fix is to export your Notion page as markdown, then run it through any method above — mdclaudy is the natural pair because it picks up where Notion leaves the markdown. The longer answer is in Notion PDF export looks bad — and the 60-second fix.

Adjacent exports — Word, HTML, EPUB, Image

If a PDF isn’t the right artifact:

Where do you write the markdown in the first place?

The editor and the exporter are different jobs. Most editors export to PDF, but the export is rarely the editor’s strong suit. If you’re still picking an editor, the comparison at the 9 best markdown editors of 2026 covers Obsidian, Typora, iA Writer, Bear, Ulysses, and the rest. Background reading on the language itself: what is markdown.

If you need free, no-watermark

Most “free” online converters watermark the output. Pandoc and md-to-pdf don’t. mdclaudy’s free tier doesn’t watermark the basic templates. The complete list is at free markdown to PDF, no watermark.

Frequently asked questions

What is the easiest way to convert markdown to PDF?

Paste the markdown into mdclaudy, pick a template, hit Export. No install, no command line. If you want zero-account, the browser-print method works: open the rendered .md in any viewer and choose Save as PDF. It will look like a webpage saved as a PDF — which is exactly what it is.

Is Pandoc the best way to convert markdown to PDF?

Pandoc gives you the highest ceiling and the steepest setup. If you already have pandocand a LaTeX distribution installed and you’re comfortable in a terminal, it produces beautiful PDFs — especially with the Eisvogeltemplate. If you don’t, expect to spend an evening installing TeX Live before you see a page.

How do I convert markdown to PDF without installing anything?

Three options. (1) Open the file in a web-based editor like mdclaudy, StackEdit, or Dillinger and use the built-in export. (2) Use an online converter like markdowntopdf.com or CloudConvert. (3) Open the file in your browser via a live-preview extension and use Ctrl+P. Each trades off design quality for convenience.

What is the best free markdown to PDF converter?

For zero-friction output: mdclaudy’s free tier (50 documents, 5 designed PDF exports per month, no watermark on the basic templates). For unlimited free use if you don’t mind the terminal: Pandoc. For one-off conversion with no account: md-to-pdf on the command line or browser print in a pinch.

Why does my markdown PDF look bad?

Three reasons almost always: the converter is using a generic browser stylesheet, the page has no real typography (font, line-height, margins), and tables/code blocks weren’t paginated for print. The fix is either a designed template (Eisvogel for Pandoc, any of the 15 templates in mdclaudy) or hand-styled CSS. See markdown to PDF formatting issues for the full breakdown.

Can I convert markdown to PDF with tables and code blocks intact?

Yes — but only if the converter uses a typographic engine, not raw browser print. Pandoc with Eisvogel, mdclaudy’s designed templates, and md-to-pdf with a custom CSS file all preserve tables, syntax-highlighted code blocks, footnotes, and KaTeX math. The browser print path often breaks tables across pages and drops syntax highlighting.

Does GitHub render markdown to PDF?

Not directly. GitHub renders .md files as HTML in the browser; to get a PDF you print the page or pipe the rendered HTML through a converter. The output is functional but unstyled — the same problem the browser-print method has everywhere.

Markdown to PDF on Mac, Windows, Linux — does it matter?

Pandoc, md-to-pdf, VS Code and mdclaudy work on all three. Marked 2 is Mac-only. Online converters and mdclaudy work from any browser. Eisvogel and other Pandoc templates work cross-platform but Windows installs of LaTeX are notoriously fiddly — most Windows users find WSL+TeX Live easier than native MikTeX.

The honest final word

Markdown to PDF is a small problem with three honest answers: install Pandoc and Eisvogel and never look back, write CSS and run md-to-pdf from your build, or let mdclaudy do it for you in the browser. The right answer depends on how often you ship a PDF and how much it has to look designed when you do.

If you only ship a few PDFs a month and you want each of them to look like it came out of a small press, that’s why we built mdclaudy. Pick a template, paste the markdown, hit export. The link below opens the converter — no card, no signup for the basic templates.

Try it at /tools/markdown-to-pdf, or sign up at /sign-upif you’d like the library and the rest of the templates.

─── try mdclaudy ───

Write markdown. Ship a designed PDF.

Fifteen hand-built templates. Optional AI. Free up to 50 documents.

No card. 50 documents included.
─── Related reading