Skip to main content

Markdown to PDF converter

Convert Markdown to PDF document

No watermarkFree & unlimited
All processing happens in your browser. No data is sent to any server.

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

Key facts about Markdown to PDF converter
Parsermarked 17 with GitHub Flavoured Markdown: tables, task lists, strikethrough, autolinks, fenced code blocks.
Styling appliedOnly a system font stack at 11 pt with 1.7 line height. The HTML converter richer stylesheet is not used here.
TablesRendered with browser default styling, which means no cell borders and no shaded header row in the PDF.
Code blocksMonospaced but unshaded and unhighlighted, since neither a background rule nor a highlighter is in play.
Text layerNone. Pages hold a JPEG at quality 0.98, so the PDF cannot be searched and its links are not clickable.
Page setupFixed at A4 portrait, 15 mm margins all round. Paper size, orientation and margins are not exposed as options.
Table of contentsNot generated. Headings receive no anchors and no numbering, and no cover page is produced.
Front matterA YAML block is not recognised as metadata and renders as a horizontal rule followed by its lines as text.
ImagesRemote images appear only if their host allows cross-origin reads; otherwise the space is left blank.
Page breaksThe 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 deltaA 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. 1

    Load the Markdown

    Drop a .md or .markdown file onto the panel or click to browse. A batch of documents is accepted.

  2. 2

    Remove front matter

    Strip any YAML header first, otherwise the title and date lines are printed as visible body text.

  3. 3

    Convert

    The document is parsed, rendered at 11 pt in a 210 mm column, captured and written into A4 sheets.

  4. 4

    Check tables and code

    Look at those sections first, since they render without borders or shading on this route.

  5. 5

    Download

    Save the PDF, or take a multi-file run as one ZIP built inside the browser.

Specs & compatibility
Input and outputTakes .md and .markdown (text/markdown) and returns the PDF as a blob with the application/pdf type, named after the file you dropped in.
Enginemarked 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.
ModesFile 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 capsTwenty Markdown files per run at 500 MB each; several PDF results are zipped in page memory as converted-pdf-files.zip.
Browser and deviceThe 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.
Because this route applies only a font and line-height rule to the rendered container, unlike the Markdown-to-HTML converter, which injects a full stylesheet with table borders and a shaded header row. Without those rules the browser draws tables with default styling, which has no visible grid. Converting to HTML first and printing that page from the browser is the practical way to get bordered tables.
No. The rendered document is photographed by html2canvas and each sheet holds that image, so there is no text layer to search, select or copy, and any link in the source is visible but inert. For a searchable result, use the Markdown-to-HTML conversion and then print to PDF from your browser, which preserves text operators and working links.
None of those are produced. The converter renders the document body and nothing else, so there is no title page, no generated contents list, no heading numbering and no page furniture. You can write a heading and an index by hand in the Markdown itself, or add page numbers to the finished PDF with a separate page-numbering tool.
No, and on this route they are not shaded either. marked emits a code element with a language class, but no highlighting library is loaded and the render applies no background rule, so the block appears as plain monospaced text at the same size as the body. The HTML conversion at least gives code a grey background and padding.
No. A mermaid block is a fenced code block as far as the parser is concerned, so its source lines are printed verbatim as text. No diagram library is involved anywhere in this conversion. Render the diagram elsewhere, export it as an image, and reference that image from your Markdown before converting.
Because every page is stored as a JPEG captured at double resolution rather than as text. A twelve-kilobyte source file therefore becomes a few hundred kilobytes, and an illustrated document more. The text-writing route on this site is the plain text converter, which produces genuinely small PDFs because it embeds no images at all.
View all

Updated

We use anonymous analytics to improve ToolChamp. No personal data is stored or sold. Privacy Policy