Markdown to PDF converter
Convert Markdown to PDF document
marked turns your Markdown into HTML, that HTML is laid out in a hidden 210 mm column at 11 pt with 1.7 line spacing, html2canvas captures it at double resolution, and jsPDF writes the capture into A4 pages with 15 mm margins. Worth knowing before you start: this path does not use the GitHub-style stylesheet that the Markdown-to-HTML converter applies. The render inherits browser defaults instead, so tables come through without borders and fenced code has no grey background, while headings, lists, emphasis and images all appear normally.
Key facts about Markdown to PDF converter
| Parser | marked 17 with GitHub Flavoured Markdown: tables, task lists, strikethrough, autolinks, fenced code blocks. |
|---|---|
| Styling applied | Only a system font stack at 11 pt with 1.7 line height. The HTML converter richer stylesheet is not used here. |
| Tables | Rendered with browser default styling, which means no cell borders and no shaded header row in the PDF. |
| Code blocks | Monospaced but unshaded and unhighlighted, since neither a background rule nor a highlighter is in play. |
| Text layer | None. Pages hold a JPEG at quality 0.98, so the PDF cannot be searched and its links are not clickable. |
| Page setup | Fixed at A4 portrait, 15 mm margins all round. Paper size, orientation and margins are not exposed as options. |
| Table of contents | Not generated. Headings receive no anchors and no numbering, and no cover page is produced. |
| Front matter | A YAML block is not recognised as metadata and renders as a horizontal rule followed by its lines as text. |
| Images | Remote images appear only if their host allows cross-origin reads; otherwise the space is left blank. |
| Page breaks | The render is one tall bitmap sliced to A4, so a break can fall inside a paragraph, a list or a code block. |
| Input accepted | .md and .markdown files, up to twenty per run, with multi-file results packed into a local ZIP. |
| Typical size delta | A 12 KB Markdown file becomes a few hundred kilobytes of PDF, because each page is stored as an image. |
What happens to your file
Your Markdown is read as text, parsed by the copy of marked bundled into this page, and rendered into an element that exists only in this tab and is removed as soon as the capture finishes. html2canvas paints that element locally and jsPDF assembles the PDF in memory before handing back a Blob. Nothing is uploaded and no rendering service is contacted. The only outbound requests possible are the ones your own document causes, such as an image hosted on a remote server.
About this tool
- 1
Load the Markdown
Drop a .md or .markdown file onto the panel or click to browse. A batch of documents is accepted.
- 2
Remove front matter
Strip any YAML header first, otherwise the title and date lines are printed as visible body text.
- 3
Convert
The document is parsed, rendered at 11 pt in a 210 mm column, captured and written into A4 sheets.
- 4
Check tables and code
Look at those sections first, since they render without borders or shading on this route.
- 5
Download
Save the PDF, or take a multi-file run as one ZIP built inside the browser.
| Input and output | Takes .md and .markdown (text/markdown) and returns the PDF as a blob with the application/pdf type, named after the file you dropped in. |
|---|---|
| Engine | marked 17.0.4 renders the Markdown to HTML, that HTML is mounted in a hidden container, and html2pdf.js 0.14.0 screenshots it with html2canvas at scale 2 into an A4 jsPDF document. |
| Modes | File mode only: Markdown to PDF has no paste box, so the Markdown arrives through the picker or a drag and drop and the PDF comes back as a download. |
| Batch and caps | Twenty Markdown files per run at 500 MB each; several PDF results are zipped in page memory as converted-pdf-files.zip. |
| Browser and device | The PDF comes from rasterising a hidden DOM node, so the ceiling on Markdown to PDF is device memory, not a browser version - every current browser runs it and phones run out first on a long document. |
- If your document is mostly tables, convert it to HTML here first, where the stylesheet draws borders, and print that file to PDF from your browser instead.
- Keep images local and reference them relatively, then convert with the file in place. Remote images without CORS headers are skipped and leave a gap.
- Break a long document into sections at natural points. Page breaks are decided by the slicer, so shorter inputs give you more control over where they fall.
- Use ordinary heading levels consistently; they carry the structure visually even without a table of contents, which this route does not build.
- For a searchable PDF of a Markdown document, convert to HTML and use your browser print-to-PDF, which keeps a real text layer.
- Send documentation or meeting notes to someone who wants a fixed-page file rather than a Markdown source.
- Produce a printable handout from a repository README without installing Pandoc, LaTeX or a static-site toolchain.
- Archive a specification as a paginated document on a machine where uploading the content is not allowed.
Related tools
View allWorks well with this4
Other PDF tools12
Updated