How to Convert Markdown to PDF — Complete Guide
Markdown is a great format for writing: it is fast, readable and works in any text editor. But when you need to send a report to a client, attach documentation to an email or print meeting notes, a PDF is usually the better choice. In this guide you will learn four ways to convert Markdown to PDF — from a one-click online converter to command-line tools — and how to get clean, professional results.
Why convert Markdown to PDF?
- Anyone can open it. PDF readers are built into every browser and operating system, while
.mdfiles often open as raw text. - The layout is fixed. Headings, tables and code blocks look the same on every screen and printer.
- It is ready to print and sign. PDFs are the standard for reports, invoices, specifications and handouts.
- It is harder to change accidentally. Good for final versions you share with people outside your team.
Method 1: Convert Markdown to PDF online (fastest)
The quickest option is a browser-based converter. With the free MarkdownNote MD to PDF converter you do not need to install anything, and your document is processed locally in your browser — it is never uploaded to a server.
- Open the Markdown to PDF converter.
- Drag and drop your
.md,.markdownor.txtfile onto the upload area, or paste your Markdown into the text box. - Click Convert to PDF.
- When the “PDF Ready!” message appears, click Download PDF.
That is all. To convert another file, click Convert Another.
What is supported
The converter handles the Markdown elements used in most documents:
| Markdown element | Example | In the PDF |
|---|---|---|
| Headings | # Title, ## Section |
Styled headings H1–H6 |
| Emphasis | **bold**, *italic*, ~~strike~~ |
Bold, italic, strikethrough |
| Lists | - item, 1. item |
Bulleted and numbered lists |
| Task lists | - [x] Done |
Checkboxes |
| Tables | | a | b | |
Bordered tables |
| Code | `inline`, fenced blocks |
Monospace code |
| Quotes | > Note |
Blockquotes |
| Divider | --- |
Horizontal rule |
Images are not embedded by the online converter. If your document has screenshots or diagrams, use Method 3 or Method 4 below.
Method 2: Pandoc (command line)
Pandoc is a free, open-source document converter popular with technical writers and academics. It produces very high-quality PDFs but requires installation and a PDF engine (usually a LaTeX distribution such as TeX Live or MiKTeX).
# basic conversion
pandoc notes.md -o notes.pdf
# better Unicode and font support
pandoc notes.md -o notes.pdf --pdf-engine=xelatex -V mainfont="DejaVu Sans"
# add a table of contents and numbered sections
pandoc notes.md -o notes.pdf --toc -N
Pandoc is the right choice for long documents, books, academic papers with citations, or when you need to automate conversions in a script or CI pipeline.
Method 3: Visual Studio Code
If you already write Markdown in VS Code, install an extension such as Markdown PDF. Open your .md file, open the Command Palette (Ctrl+Shift+P / Cmd+Shift+P) and run Markdown PDF: Export (pdf). The PDF is saved next to your Markdown file, and images referenced with relative paths are included.
Method 4: Your browser’s “Print to PDF”
This method works everywhere and includes images:
- Convert your Markdown to a full HTML page with the Markdown to HTML converter (enable Full HTML document) and download it.
- Open the
.htmlfile in Chrome, Edge, Firefox or Safari. - Press Ctrl+P (Cmd+P on Mac) and choose Save as PDF as the printer.
- Adjust margins, paper size and “Background graphics”, then save.
Which method should you use?
| Method | Install needed | Images | Best for |
|---|---|---|---|
| Online converter | No | No | Quick, private conversions of text documents |
| Pandoc | Yes | Yes | Long documents, automation, academic work |
| VS Code extension | Yes | Yes | Developers who already write in VS Code |
| Browser print | No | Yes | Documents with images, custom page settings |
Tips for a better-looking PDF
- Use a single H1 for the document title and H2/H3 for sections. A clear hierarchy makes the PDF easy to scan.
- Keep tables narrow. Wide tables with many columns get squeezed on an A4 or Letter page. Split them or move details into lists.
- Specify the language on code blocks (
```python) — it keeps your source tidy and helps tools that support highlighting. - Check your Markdown first. Paste it into the Markdown editor to preview it before converting; most “broken” PDFs come from a missing blank line before a list or table.
- Need to edit the result? Convert to Word with the Markdown to DOCX converter, adjust the layout in Word or Google Docs, and export to PDF from there.
Troubleshooting
My table shows up as plain text. Make sure there is a blank line before the table and that the second row is the separator (|---|---|).
A list is merged into the previous paragraph. Add an empty line between the paragraph and the first list item.
Special characters look wrong in Pandoc. Use --pdf-engine=xelatex and a font that contains the characters you need.
Structuring a document that converts well
A PDF is only as good as the Markdown behind it. A predictable structure makes the result look intentional:
# Project Proposal: Customer Portal
**Prepared for:** Acme Corp · **Date:** November 2026
## Summary
Two or three sentences with the key point and the decision you need.
## Scope
- Self-service account page
- Invoice history and downloads
## Timeline
| Phase | Duration |
|-------|----------|
| Design | 2 weeks |
| Build | 6 weeks |
## Next steps
1. Approve the scope
2. Schedule the kickoff
- Put the title and metadata (client, author, date) at the very top — it acts as a simple cover.
- Start with a summary so a reader who only opens the first page gets the point.
- Use tables for numbers and numbered lists for steps; they are the easiest elements to scan in print.
- End with next steps or contacts, so the document leads to an action.
Markdown to PDF on Windows, macOS and Linux
The online converter works the same on every operating system because it runs in the browser. For offline workflows:
- Windows: install Pandoc and MiKTeX, or use VS Code with a PDF extension.
- macOS: install Pandoc and MacTeX (or BasicTeX) via Homebrew:
brew install pandocandbrew install --cask basictex. - Linux: install Pandoc and TeX Live from your package manager, for example
sudo apt install pandoc texlive-xetexon Debian or Ubuntu.
If you only convert a document now and then, the browser method saves you a multi-gigabyte LaTeX installation.
Frequently asked questions
Is it safe to convert confidential documents online?
With MarkdownNote, yes: the PDF is generated by JavaScript in your browser, and the text is never sent to a server. With other online converters, check whether files are uploaded.
Can I convert Markdown to PDF on my phone?
Yes. The online converter works in mobile browsers on Android and iOS.
How do I convert several Markdown files at once?
For batch conversion use Pandoc in a loop, for example for f in *.md; do pandoc "$f" -o "${f%.md}.pdf"; done on macOS or Linux.
Convert Markdown to PDF now
Paste your Markdown or drop a .md file — get a PDF in seconds. Free, no sign-up, nothing uploaded.
Open MD to PDF converter