The easiest way to convert markdown to PDF or Word on Mac is to export from a markdown app such as atiea, which exports to PDF, DOCX, HTML and Markdown. Alternatively use the command-line tool Pandoc.
You wrote in markdown and now someone wants a PDF or a Word document. There are three practical routes on a Mac: export from a markdown app, run Pandoc, or print a rendered preview to PDF. This guide shows each, with commands you can copy, and covers the problems that usually come up.
Option 1: Export from a markdown app
The simplest route is a notes app with built-in export. atiea exports a note to Markdown, HTML, PDF and DOCX, so you can write in plain text and send a finished file when needed. There is no command line and no extra software to install.
A good habit is to read the rendered preview first. If the preview looks right, the export will generally match it, so you catch broken tables or missing images before the file leaves your Mac. atiea is a native macOS 15+ app, and its markdown editor shows live highlighting as you write.
Option 2: Pandoc
Pandoc is a free, open-source command-line converter that handles many formats. If you use Homebrew, install it with:
brew install pandoc
Then convert a file:
pandoc note.md -o note.docx
pandoc note.md -s -o note.html
pandoc note.md -o note.pdf
Pandoc picks the output format from the file extension. The -s flag (standalone) produces a complete HTML page rather than a fragment. The PDF command only works if a PDF engine is installed; by default Pandoc uses LaTeX, so you need a LaTeX distribution such as MacTeX or BasicTeX, or you can choose another engine:
pandoc note.md --pdf-engine=weasyprint -o note.pdf
That requires the named engine to be installed separately. If you do not already have one, the other two options are quicker for a one-off PDF.
Useful Pandoc options
| Goal | Command |
|---|---|
| Add a table of contents | pandoc note.md --toc -s -o note.html |
| Treat input as GitHub-style markdown | pandoc -f gfm note.md -o note.docx |
| Combine several files into one | pandoc intro.md body.md -o report.docx |
| Use your own Word styles | pandoc note.md --reference-doc=template.docx -o note.docx |
Convert a whole folder
for f in *.md; do
pandoc "$f" -o "${f%.md}.docx"
done
This creates a DOCX next to every MD file in the current folder. Quote "$f" so filenames with spaces work.
Custom Word styling
Pandoc lets you supply a reference document so the output uses your fonts and heading styles. Generate Pandoc’s default one, edit its styles in Word, and reuse it:
pandoc -o custom-reference.docx --print-default-data-file reference.docx
pandoc note.md --reference-doc=custom-reference.docx -o note.docx
Edit only the styles (Heading 1, Normal, and so on), not the body text, in that reference file.
Option 3: Preview and print to PDF
Open a rendered preview of your note, choose Print (Cmd+P), then open the PDF menu in the lower left of the print dialog and choose Save as PDF. This works in any Mac app that can print, which makes it the fallback when nothing else is installed. Exact print options vary by app.
Which should you use?
| Situation | Best option |
|---|---|
| One-off share with a colleague | Export from your notes app |
| Batch converting many files | Pandoc |
| Custom fonts and Word styles | Pandoc with a reference document |
| No extra software | Print to PDF |
| Web page or email-ready markup | HTML export |
Tips for clean output
- Use real headings (
#) so Word gets proper heading styles and a usable outline. - Keep tables simple, with short cells; see markdown tables.
- Leave a blank line before lists and tables, or they may not render.
- Use a single
#title per note and##for sections. - Check the preview before exporting, and open the result once before sending it.
Troubleshooting
- Pandoc says it cannot find a PDF engine. Install a LaTeX distribution or pass
--pdf-enginewith an engine you have installed. - Task lists show as plain brackets. Task list support depends on the converter and markdown flavor. Try
-f gfmin Pandoc, or check how your checklists render in the app preview. - Images are missing. Image paths are resolved relative to where you run the command, so run Pandoc from the note’s folder, or use full paths.
- Wiki links appear as literal text.
[[Note title]]is a notes-app convention, not core markdown, so converters like Pandoc may leave the brackets as they are. Replace them with normal links or plain text before converting if that matters. - Word formatting looks plain. Pandoc’s default styling is basic. Use a reference document.
When not to convert
If the recipient only needs to read the content, a PDF is usually best. If they need to edit, send DOCX. If they are comfortable with plain text, just send the MD file; see what an MD file is for how they can open it. And for pixel-precise layouts such as brochures, design in a layout tool rather than converting from markdown.
New to the syntax? Start with the markdown cheat sheet or read how to take notes in markdown. To compare apps by export support and other features, see the best markdown notes apps for Mac, and check each product’s site for current details.
Worked example: a report from three notes
Say you keep a project report as three notes: intro.md, findings.md and next-steps.md. To produce one Word file with a table of contents, copy the three files into one folder and run:
cd ~/Documents/report
pandoc intro.md findings.md next-steps.md --toc -o report.docx
Pandoc joins the files in the order you list them, so name them in reading order. Each file should start with its own # or ## heading. Open the result in Word, check the heading levels in the navigation pane, and adjust styles if you need to.
If you only have one note and no command line experience, the app route is shorter: open the note in atiea, check the preview, and export to DOCX or PDF.
PDF or DOCX or HTML?
| Format | Choose it when | Watch out for |
|---|---|---|
| The reader only needs to read or print | Hard to edit afterward | |
| DOCX | The reader will edit or comment in Word | Styling may need touch-ups |
| HTML | You want a web page or to paste into another tool | Images need to travel with the file |
| Markdown | The reader already uses markdown | Not readable as a document for everyone |
Whichever you choose, keep the original markdown note. It stays small, editable and easy to reconvert later. If privacy matters for what you are exporting, atiea keeps notes local on your Mac; see the private, local-first notes app guide.