MDPDFOpen the converter →

How to convert Markdown to PDF on a Mac

A practical guide · about 5 min read

macOS doesn't have a built-in “Markdown to PDF” command, but it does have everything you need to get there, and there are several good routes depending on whether you want zero setup or full control. Here are four that work well, from simplest to most powerful.

1. In the browser (no install)

The fastest route needs nothing installed: open a browser-based converter, paste your Markdown, and save as PDF. On a Mac this uses Safari or Chrome's own print engine, which already has the system fonts — so Chinese, Japanese and Korean text renders correctly, which is where a lot of other tools fall down.

  1. Open the converter, paste your Markdown or drop in a .md file.
  2. Choose a page size — A4 or US Letter — and a style.
  3. Click Download PDF, then pick Save as PDF in the print dialog.

Because it runs entirely on your Mac, the document never gets uploaded anywhere — handy for anything work-related.

2. Marked 2, Typora, or MacDown

If you write Markdown often, a dedicated Mac app is worth it. Typora is a clean “what you see is what you get” editor with File → Export → PDF. Marked 2 is a live previewer that pairs with whatever text editor you already use and exports polished PDFs with custom CSS themes. MacDown is a free, open-source option. All three give you nicer typography control than a quick browser export, at the cost of installing an app.

3. From the command line with Pandoc

If you're comfortable in Terminal, Pandoc is the power tool. Install it with Homebrew, plus a LaTeX engine for the PDF step:

brew install pandoc
brew install --cask basictex   # a small LaTeX distribution

pandoc notes.md -o notes.pdf --pdf-engine=xelatex

For a document with Chinese, Japanese or Korean text, point Pandoc at a CJK font that's already on your Mac:

pandoc notes.md -o notes.pdf \
  --pdf-engine=xelatex \
  -V mainfont="PingFang SC"

Pandoc is the right choice when you need repeatable, scripted conversions or fine control over templates. For a one-off document it's overkill — that's what routes 1 and 2 are for. There's a fuller walkthrough in our command-line guide.

4. Straight from VS Code

If you already write in Visual Studio Code, the “Markdown PDF” extension adds a right-click Markdown PDF: Export (pdf) command. It renders using a bundled browser engine, so it handles GFM tables and code highlighting without a LaTeX install. Convenient if VS Code is already open; less so if it isn't.

Which should you pick?

If you…Use
Just need it now, nothing installedBrowser converter
Write Markdown dailyTypora / Marked 2
Want scripted, repeatable outputPandoc
Live in VS Code alreadyMarkdown PDF extension

A note on the “Print to PDF” trick

You might wonder why you can't just open the .md file in Preview and print to PDF. The catch is that a raw .md file is plain text — Preview will print the literal # and ** characters, not a formatted document. Something has to render the Markdown into HTML first, which is exactly what all four routes above do. Once it's rendered, macOS's system-wide Save as PDF (in any print dialog) does the final step.

For most people, the browser route is the quickest good answer. Open the converter, paste, and you'll have a clean PDF in a few seconds.

Convert on your Mac now

Runs in Safari or Chrome. Nothing uploaded.

Open the converter