Free Online Markdown to PDF Converter

Paste or upload Markdown and download a paginated PDF, with code highlighting, tables, and Mermaid diagrams included. No login, no watermark.

Markdown → PDF
PDF PreviewLive

Project Notes

Convert Markdown into a clean, shareable document.

  • Runs in your browser, nothing is uploaded
  • Tables, task lists and code blocks
FeatureSupported
GFMYes
console.log('Hello, MDTool');

Markdown to PDF conversion renders Markdown, including headings, tables, syntax-highlighted code, and Mermaid diagrams, into a paginated PDF document ready to print, email, or archive. MDTool generates the PDF entirely in your browser as a vector document with selectable text, so your file is never uploaded. Choose one of four themes and A4 or US Letter. It is free, with no signup and no watermark.

Diagram: converting a Markdown file into PDFMarkdownfilePDFoutput

How Do You Convert Markdown to PDF?

  1. Paste your Markdown text in the left panel, or click Upload .md to load a file
  2. Choose a PDF theme: GitHub, Academic, Minimal, or Dark
  3. See the live preview update in real-time on the right
  4. Click Download PDF, Free to save your file

What Gets Preserved in the PDF?

MDTool turns each Markdown element into a native part of the PDF rather than a screenshot of the page, so text stays selectable and searchable and the file stays small. This is what each element becomes, including the limits:

Markdown elementIn the PDF
Headings, paragraphs, bold, italic, links✅ Real, selectable text
Fenced code blocks✅ Syntax-highlighted per theme, monospace, shaded box
Mermaid diagrams✅ Rendered as vector graphics (flowchart, sequence, class, state, pie, gantt)
Tables (GFM)✅ Header fill and thin borders
Strikethrough, blockquotes, lists✅ Kept
Task lists⚠️ Shown as [x] and [ ] text, not drawn checkboxes
Images by full URL✅ Embedded when the host allows cross-origin requests
Images by relative path (./img.png)❌ A browser cannot read local files; use full URLs
Page breaks✅ <!-- pagebreak -->, \pagebreak, \newpage and page-break divs
Chinese and Japanese text✅ Rendered with Noto Sans SC, loaded only for documents that need it
Emoji❌ Left out of the PDF (no emoji glyphs in the embedded font)
Footnotes ([^1]), math❌ Not rendered; shown as plain text
Page one of the same Markdown document exported to PDF in the GitHub, Academic, Minimal and Dark themes
The same document exported in all four themes. In Academic and Minimal the diagram moves to page two together with its heading.

Which Theme and Page Size Should You Use?

ThemeBest for
GitHubREADMEs and developer documentation
AcademicPapers, reports and formal write-ups (centered title)
MinimalClean, modern general-purpose documents
DarkDark-background reading and screen sharing

Choose A4 for most of the world and US Letter for the United States and Canada; the Page menu sits next to the theme buttons. To start a new page at a specific point, put<!-- pagebreak --> on its own line. Headings are kept on the same page as the block that follows them, so a heading never ends up alone at the bottom of a page.

Why Do Some Markdown to PDF Converters Lose Formatting?

Mermaid diagrams and syntax highlighting are the two things most converters drop, and for the same reason: neither exists in the Markdown itself. A```mermaid block is text until something draws it, and code colors are classes that a PDF engine ignores unless they are turned into real colors. A converter that skips either step prints the diagram as raw text and the code in one flat color.

MDTool draws each Mermaid diagram as an SVG in your browser before the PDF is built and places it in the document as vector graphics, so labels stay sharp and selectable. Code is highlighted withhighlight.js and every token color is written into the PDF using a palette matched to the theme. The PDF itself is generated bypdfmake, a vector engine, instead of capturing an image of the page. The preview and the PDF come from the same parsed document, so diagrams, code colors and page breaks land in the same places; fonts differ slightly because the PDF embeds its own.

A PDF page exported by MDTool showing a Mermaid sequence diagram, pie chart and class diagram rendered as vector graphics
Sequence, pie and class diagrams in an exported PDF page.

Is This Markdown to PDF Converter Really Free?

Yes. The PDF is generated on your own device, so there is no server cost to recover with a paywall, a daily limit or a watermark. There is no account, no email and no trial. Because nothing is uploaded, it also works for confidential documents: you can confirm it in your browser's Network tab, which shows no request carrying your Markdown when you click Download.

Frequently Asked Questions

Yes. MDTool fully supports GitHub Flavored Markdown including tables, task lists, strikethrough, fenced code blocks with syntax highlighting, and autolinks.

Related Markdown tools

Keep the same document workflow moving with another free, browser-based MDTool. Your content stays on your device while you work.