Skip to content

Markdown to PDF

Turn Markdown files or pasted notes into a clean, searchable PDF with no watermark.

Paste Markdown or drop .md files

How to use Markdown to PDF

  1. Add your Markdown. Paste text into the editor, click Load sample to preview, or use Choose .md files to load one or more files up to 10 MB each.
  2. Configure page layout. Pick A4 or US Letter under Page size, choose Portrait or Landscape under Orientation, and select Narrow, Normal, or Wide under Margins.
  3. Pick typography and batch mode. Select Clean or GitHub under Style, choose Sans or Serif with 9 pt to 12 pt text size, toggle Number pages, and pick ZIP or combined PDF for multi-file batches.
  4. Export the PDF. Click Convert Markdown to PDF to save a searchable vector document with sidebar bookmarks.

Your files are processed on this device and never uploaded. They stay private, and there's nothing to delete afterwards.

Rather than capturing a blurry browser screenshot, the converter draws every paragraph, heading, and table directly onto PDF pages using vector font metrics. All parsing and layout happen inside a local Web Worker with 0 bytes uploaded, producing compact files that stay razor-sharp at any zoom level.

Generating selectable fonts and clickable URI annotations

Under the Library of Congress PDF 1.7 (ISO 32000-1) Format Description, PDF files store discrete text operators and interactive URI link annotations. When your Markdown includes inline reference links or autolinked URLs, the renderer attaches clickable PDF link rectangles directly over the styled link text.

Inline code spans render inside subtle padded pills using monospace Courier, while bold, italic, and strikethrough spans preserve their visual hierarchy. If you need an editable Word manuscript for tracked changes instead of a locked PDF, use Convert Markdown to Word (.docx).

Building sidebar PDF bookmarks from H1 to H3 headings

Long technical specs and release notes become far easier to navigate when viewers can jump between sections. The typesetter extracts every H1, H2, and H3 heading and writes a hierarchical PDF outline tree into the document catalog.

It also infers the PDF document title from the first H1 heading when you paste raw Markdown, or falls back to the uploaded filename. Turning on Number pages adds clean footer pagination across every sheet.

Should you choose GitHub or Clean style for GFM blocks and margins?

Picking between the GitHub and Clean presets under Style controls how headings, code blocks, and tables paginate across sheets. Formatting rules follow the GitHub Flavored Markdown Specification, extending core Markdown with pipe tables, task list checkboxes, and strikethrough.

Comparing GitHub and Clean typography presets

The GitHub preset adds subtle bottom borders beneath H1 and H2 headings, tinted gray backgrounds behind fenced code blocks, and shaded header fills on tables. The Clean preset uses lighter horizontal rules and minimal shading for formal reports, memos, and printed handouts.

Preventing fenced code blocks from clipping across pages

Long shell scripts and JSON examples inside fenced code blocks split cleanly at line boundaries instead of clipping mid-character at the bottom margin. Proportional line wrapping also keeps long lines inside the printable text frame without overflowing the right margin.

Markdown element Clean theme rendering GitHub theme rendering Multi-page behavior
H1 to H6 headings Crisp typographic scale Underlined H1/H2 + scale H1 to H3 generate PDF bookmarks
Fenced code blocks Light bordered block Shaded background + border Splits cleanly across page breaks
GFM pipe tables Proportional columns Shaded header + zebra rows Repeats header row on new pages
Task lists Drawn vector checkboxes Drawn vector checkboxes Indents nested sub-items cleanly
Blockquotes Left accent bar Left accent bar + tint Flows across page boundaries

For documents dominated by wide 6-column or 10-column matrices, keep wide Markdown pipe tables legible on landscape PDFs with automatic orientation switching.

Batch converting multiple .md files and choosing page geometry

Teams documenting releases, API endpoints, or runbooks often maintain dozens of separate .md files in a repository. Dropping two or more files at once switches the interface into batch mode so you never have to convert documents one by one.

Exporting separate PDFs in a ZIP or one combined document

When multiple files are queued, Batch output lets you choose Separate PDFs in a ZIP or Combine into one PDF. Files follow the IETF RFC 7763 The text/markdown Media Type convention for .md, .markdown, and .txt inputs up to 10 MB per file.

The live block counter summarizes headings, tables, and code blocks immediately for documents under 250,000 characters. If you want visual social previews rather than printable documents, try the md to png tool for card exports.

Selecting A4, US Letter, margins, and Sans or Serif fonts

Page dimensions match A4 at 595.28 by 841.89 pt or US Letter at 612 by 792 pt, with Portrait or Landscape orientation. Under Margins, Narrow sets 36 pt padding, Normal sets 56 pt, and Wide sets 72 pt, paired with Sans or Serif at 9 pt, 10 pt, 11 pt, or 12 pt.

Tip: Choose Narrow margins (36 pt) and 10 pt Sans text when exporting dense API references that contain wide fenced code blocks or multi-column tables.

What happens to Mermaid diagrams, math, and non-Latin glyphs?

Offline vector PDF generation trades external browser rendering for speed, determinism, and strict privacy. Understanding how the engine handles special syntax, character sets, and large files helps you prepare clean source Markdown before clicking Convert Markdown to PDF.

Handling WinAnsi font folding and 10 MB file limits

Block-level parsing for paragraphs, lists, and fenced code adheres to the CommonMark 0.31.2 Specification. Because the PDF embeds standard Helvetica, Times Roman, and Courier fonts using WinAnsi encoding, smart quotes and common typographic punctuation fold to clean ASCII equivalents.

Each uploaded .md file is capped at 10 MB so browser memory stays responsive during layout calculation. Very long single-file exports over 250,000 characters skip the live header counter in the editor but still paginate completely into PDF.

Exporting diagrams separately when fenced code is not enough

Fenced mermaid blocks and $...$ math expressions stay readable as monospace code or plain inline text rather than triggering remote rendering requests. When a technical spec relies on flowcharts or sequence diagrams, you can render Mermaid flowcharts as standalone SVG or PNG first before assembling your final report.

Questions

Does Markdown to PDF create selectable text or an image?

It creates real vector PDF text using embedded standard PDF fonts rather than rasterized page screenshots. Readers can search, highlight, copy code snippets, and click hyperlinks at any zoom level.

Which GitHub Flavored Markdown elements are supported?

The parser handles H1 through H6 headings, bold, italic, strikethrough, inline code pills, nested bullet and numbered lists, task checkboxes, blockquotes, fenced code blocks, and pipe tables with repeating headers.

How do PDF bookmarks work for Markdown headings?

Every H1, H2, and H3 heading is registered in the PDF document outline so desktop and mobile viewers display a clickable table of contents in the sidebar.

Can I convert multiple Markdown files at once?

Yes. Dropping two or more .md files reveals the Batch output selector, letting you export either Separate PDFs in a ZIP or Combine into one PDF.

Why do non-Latin characters or emoji turn into fallback glyphs?

Standard PDF Helvetica, Times Roman, and Courier fonts use WinAnsi Latin encoding to keep output files compact and fast. Characters outside that range are folded to ASCII equivalents or replaced safely.

Why are browser print headers and URL footers missing here?

Unlike your browser's Print to PDF dialog, this converter builds the PDF directly in memory without injecting page titles, timestamps, or local file URLs into the margins. Turn on Number pages if you want clean page numbers centered at the bottom.

How are Mermaid diagrams or external images handled?

Fenced Mermaid blocks render as shaded monospace code blocks because the typesetter operates offline without external network requests. Export diagrams separately as SVG or PNG if you need visual graphics.

Updated