Markdown PDF Swap

Markdown to PDF

Choose a Markdown file

…or drop a Markdown file here

.md, .markdown, .mdown, .mkd

Convert

Download

FAQ and format details
Why convert Markdown to PDF?

Use Markdown→PDF when you need a frozen snapshot (a tagged release's documentation, a homework writeup, meeting notes) and you do not want to install pandoc or a LaTeX toolchain. If you already have a static site, printing that HTML from the browser may look nicer; this path is for the source file itself.

How this conversion runs

marked produces HTML. pdf-lib lays out headings and paragraphs in Times, wrapping to US Letter with 1-inch margins. Characters outside the built-in fonts are substituted. Images in the Markdown as remote URLs are not downloaded; they become placeholders.

Keep in mind for Markdown → PDF

You do not get syntax-highlighted code, page headers, or a table of contents with page numbers. Deeply nested lists and huge tables will look cramped. For a book, Markdown→EPUB is a better reading experience; for comments, Markdown→DOCX.

After you have a PDF file

Skim the PDF for '?' where emoji or CJK were. If it is unacceptable, print the Markdown preview from VS Code or a browser instead so fonts embed. Archive the .md alongside the PDF so you can regenerate.

Can I use a custom font?

Not in this converter. It uses pdf-lib standard Times. Browser print-to-PDF from an HTML preview is the workaround for webfonts.

Do Markdown page-break comments work?

No. There is no \pagebreak handling. Split files or insert extra headings if you need a hard break, or print from HTML with CSS break-before.

This pair at a glance
Accepts
.md, .markdown, .mdown, .mkd
Writes
.pdf · application/pdf
Read fidelity
high (Markdown → HTML)
Write fidelity
medium (HTML → PDF)
Source size
Plan for files under 3.8 MB

Runs in this browser.

Something off with this pair? Send feedback.

About Markdown and PDF

Source file

Markdown

A lightweight plain-text syntax for structured writing that compiles to HTML. The lingua franca of README files, wikis, and note apps.

Markdown stores documents as readable plain text with a small set of punctuation conventions for headings, emphasis, lists, links, and code. GitHub-Flavored Markdown (GFM) adds tables, strikethrough, task lists, and fenced code blocks. Conversion through HTML is a natural fit because Markdown was designed as an HTML shorthand.

Extensions
.md, .markdown, .mdown, .mkd
MIME types
text/markdown, text/x-markdown
Kind
text · utf-8
Category
markup
Standard
Open format · since 2004
Comfortable size
Up to about 3.8 MB in this browser converter
Read into HTML
high fidelity · implemented — Parsed as GitHub-Flavored Markdown.

What this format can hold

  • headings
  • paragraphs
  • lists
  • tables
  • links
  • images
  • inline formatting
  • code blocks
  • blockquotes

Usually dropped on the way in

  • raw html passthrough is sanitized

Apps that consume Markdown

  • GitHub (GitHub) — creates and opens on Web
  • Obsidian (Dynalist) — creates and opens on Windows, macOS, Linux, iOS, Android
  • VS Code (Microsoft) — creates on Windows, macOS, Linux
  • Typora — creates and opens on Windows, macOS, Linux
  • Notion — creates and opens on Web, Windows, macOS
  • Jupyter — creates and opens on Web
  • Discord — opens on Web, Windows, macOS, iOS, Android

Catalog notes

  • Front matter (YAML between --- lines) is preserved as a prefix when converting from Markdown, and ignored when converting to Markdown.
  • Obsidian wikilinks and footnotes have no lossless HTML equivalent yet.

Destination file

PDF

A page-description format that paints glyphs and graphics onto fixed pages. Universal for print, archival, and sharing.

PDF (Portable Document Format) describes pages, not a flowing document tree. Incoming PDFs are reconstructed as HTML: designed pages keep positioned text, fonts, images, and vectors; simpler reading documents become flowing articles. Export to PDF paints HTML onto pages via pdf-lib. Pixel-perfect Word/InDesign layout is not the goal.

Extensions
.pdf
MIME types
application/pdf
Kind
binary · binary
Category
page description
Standard
Open format · since 1993
Spec
ISO 32000
Comfortable size
Up to about 38 MB in this browser converter
Written from HTML
medium fidelity · implemented — HTML is paginated onto US Letter pages via pdf-lib. Embedded PNG/JPEG data URLs are painted. Print-to-PDF from the preview remains the highest-fidelity path.

What this format can hold

  • page layout
  • paragraphs
  • images
  • links
  • embedded fonts

Usually dropped on the way out

  • css absolute layout
  • webfonts unless embedded
  • interactive forms

Apps that consume PDF

  • Adobe Acrobat / Reader (Adobe) — creates and opens on Windows, macOS, iOS, Android
  • Chrome (Google) — opens on Windows, macOS, Linux, Android
  • Edge (Microsoft) — opens on Windows, macOS
  • Preview (Apple) — opens on macOS, iOS
  • Foxit — creates and opens on Windows, macOS
  • Okular (KDE) — opens on Linux

Catalog notes

  • Encrypted PDFs cannot be opened in-browser without the password (not collected).
  • OCR for image-only scans is out of scope for v1.
Other conversions

Other conversions from Markdown: HTMLWordRTFOpenDocumentEPUB

Other ways to get PDF: HTMLWordRTFOpenDocumentEPUB