How to Convert Markdown to PDF
Markdown is the best format ever invented for writing — and one of the worst for sharing. Send a raw .md file to a client, a professor, or anyone non-technical, and they'll open a wall of pound signs and asterisks in Notepad. What they actually want is a PDF: fixed layout, opens everywhere, prints cleanly.
The fastest way to get one is the free Markdown to PDF converter. Paste your markdown (or upload the file), check the live preview, and download a proper PDF — with real selectable text, working tables, and formatted code blocks. Everything happens in your browser: your document is never uploaded to a server, which matters more than you'd think when the file is an internal doc, a contract draft, or client notes.
This guide covers the browser method step by step, exactly what the PDF supports (and the two things it doesn't), and when a command-line tool like Pandoc is the better choice.
How to Convert Markdown to PDF Online (Free)
- Open the Markdown to PDF tool. No account, no signup, no watermark.
- Add your markdown. Either paste it into the editor on the left, or click Upload .md and pick your file (
.mdand.txtboth work). The file is read locally by your browser — it never leaves your computer. - Check the live preview. The right-hand panel renders your document on an A4-style page as you type. Headings, tables, lists, and code blocks appear exactly as they'll be laid out.
- Click Download PDF. The converter builds a real, text-based PDF and downloads it as
document.pdf. Rename it to whatever you like.
That's the whole process — for most documents it takes under 30 seconds. The first conversion loads the PDF engine (a second or two); after that it's near-instant.
What Formatting Survives the Conversion
The converter understands GitHub-Flavored Markdown and maps each element to proper PDF formatting:
| Markdown element | In the PDF |
|---|---|
| Headings (# to ######) | Sized, bold headings (24pt down to 11pt) |
| Bold, italic, ~~strikethrough~~ | Rendered as styled text |
| Tables (GFM) | Real bordered tables with header row |
| Code blocks & inline code | Monospace blocks with background shading |
| Ordered / unordered lists | Proper lists, nesting preserved |
| Links | Clickable, blue underlined |
| Blockquotes | Indented quote styling |
| Horizontal rules (---) | Divider lines |
Long documents paginate properly across multiple A4 pages — text never gets cut off mid-line, because this is a real document conversion, not a screenshot.
Why "Real Text" PDFs Beat Screenshot PDFs
Many free converters (and some paid ones) cheat: they render your document, take a giant screenshot, and wrap the image in a PDF file. It looks fine at first glance, but the difference shows up immediately in use:
- Selectable and copyable — recipients can highlight and copy your text. In an image PDF, nothing selects.
- Searchable — Ctrl+F works, and search engines / document systems can index the content.
- Sharp at any zoom — text stays crisp; screenshots go blurry when zoomed or printed.
- Small file size — text PDFs are usually a fraction of the size of image PDFs. If yours still needs to shrink for email, run it through the free PDF compressor.
The Markdown to PDF tool does true text conversion — it reads your markdown's structure and rebuilds it as native PDF text and tables.
Two Limits to Know Before You Convert
Honesty saves you a re-export. The browser converter has two limitations:
1. Images aren't embedded
An image reference like  won't place the picture in the PDF — it appears as a gray placeholder note ([Image: diagram]) instead. If your document is text, tables, and code — which covers most READMEs, notes, and docs — you'll never notice. If images are essential, use the workaround below.
2. Raw HTML is skipped
Markdown files sometimes contain embedded HTML (<div> blocks, <img> tags, HTML comments). The converter ignores these entirely rather than printing the code as text. Pure markdown converts; HTML islands vanish.
Image workaround: open your file in the free Markdown editor, which renders images in its live preview, then use your browser's Print → Save as PDF on the preview. You trade real-text quality for image support — pick per document. For frequent image-heavy conversions, Pandoc (next section) handles everything.
Other Ways to Convert (Pandoc, VS Code, Print)
The browser tool is the fastest path for everyday documents. For special cases:
Pandoc (command line — the power option)
Pandoc converts markdown to PDF with full image support and custom styling, via a LaTeX engine:
pandoc document.md -o document.pdf
The catch: you need to install Pandoc and a LaTeX distribution (often 1–4 GB). Worth it if you convert documentation daily; overkill for occasional use.
VS Code extension
If you write markdown in VS Code, the "Markdown PDF" extension adds a right-click export. Convenient inside the editor, but it bundles a headless Chromium download and exports can be slow on long files.
Browser Print to PDF
Render your markdown anywhere it previews (like the Markdown editor), then Ctrl+P / Cmd+P → Save as PDF. Quick, supports images, but page breaks land wherever they land and browser headers/footers sneak in unless you disable them in the print dialog.
Tips for a Better-Looking PDF
- Start with one H1. A single
#title at the top, then##sections — the PDF reads like a properly structured document. - Use the preview as your proof. What you see on the A4 preview page is the layout you'll get. Fix awkward spots in the markdown before downloading, not after.
- Prefer tables over ASCII art. GFM pipe tables convert to real bordered tables; hand-aligned columns of spaces won't survive.
- Break up wall-of-text sections. Headings and lists paginate gracefully across pages; ten-line paragraphs read badly in print.
- Rename the download. The file arrives as
document.pdf— give it a real name before sending. - Converting from Word instead? If your source is a
.docxrather than markdown, use the Word to PDF tool — same privacy, built for that format.
Frequently Asked Questions
How do I convert a markdown file to PDF for free?▼
Is the text in the PDF selectable and searchable?▼
Do markdown tables and code blocks convert properly?▼
Why aren't my images showing in the PDF?▼
Is it safe to convert confidential documents?▼
Can I convert a README.md to PDF?▼
Should I use Pandoc or an online converter?▼
Ready to try it?
Use the tool right now — free, no signup, no upload.