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.
Project Notes
Convert Markdown into a clean, shareable document.
- Runs in your browser, nothing is uploaded
- Tables, task lists and code blocks
| Feature | Supported |
|---|---|
| GFM | Yes |
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.
How Do You Convert Markdown to PDF?
- Paste your Markdown text in the left panel, or click Upload .md to load a file
- Choose a PDF theme: GitHub, Academic, Minimal, or Dark
- See the live preview update in real-time on the right
- 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 element | In 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 |

Which Theme and Page Size Should You Use?
| Theme | Best for |
|---|---|
| GitHub | READMEs and developer documentation |
| Academic | Papers, reports and formal write-ups (centered title) |
| Minimal | Clean, modern general-purpose documents |
| Dark | Dark-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.

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.