Skip to content
PDFNothing leaves this tab

Markdown to PDF

Renders your Markdown, then hands it to the browser's own print engine. The PDF is written on your machine.

1Source

Notes on a Slow Correspondence

Marcus Aurelius wrote his private notebook in camp, between campaigns, never expecting anyone else to read it. He addressed most entries to himself, and the tone shows it: short, unpolished, more reminder than argument.

That habit is worth borrowing for anything meant to last past the day it was written. A note typed once and left alone reads differently a year later than a message sent and forgotten. Markdown holds a document still long enough for that difference to matter.

What survives the format change from draft to page:

  • Headings, so the shape of the argument stays visible
  • Lists, for anything that was actually a list and not a paragraph pretending
  • A blockquote, when someone else said it better

Waste no more time arguing about what a good man should be. Be one.

None of that needs special software to write. A text editor and # at the start of a line will do it.

The sample quotes Marcus Aurelius (blockquote), Meditations, Book 10 (blockquote only).

2Print it

Opens your browser's print dialog. Choose Save as PDF as the destination. The file is written on your machine.

Batch

Have several .md files instead?

Drop them in and print each one as a PDF, one after another.


Mechanism

How this works

The Markdown is parsed and rendered into a styled document in the page, then the browser's print pipeline is invoked against it. Every modern browser ships a PDF writer for exactly this, and using it means the document never needs a server. Page size and margins are decided in the print dialog, as is whether backgrounds print, and we override none of it.

Limits

Where Markdown to PDF conversion falls short

  • No Mermaid diagrams. A fenced block written as ```mermaid prints as a plain code block, the same as any other fenced code — the diagram syntax inside it is not drawn.
  • No math. LaTeX or MathJax notation such as $E = mc^2$ prints exactly as typed, dollar signs and backslashes included, rather than as a typeset equation.
  • No embedded HTML blocks. Raw HTML written inside the Markdown — a <div>, a <table> built by hand, an <iframe> — is escaped and printed as visible text rather than being executed as markup. That is a safety boundary as much as a feature gap: this tool never runs HTML or a script that happened to be sitting inside your document.
  • Page breaks land where the print engine puts them. There is no control for forcing a break at a particular heading.
  • Fonts come from what your machine has available, so the same Markdown printed on another computer can paginate differently.
  • Some mobile browsers offer no Save as PDF destination at all, which puts this out of reach on those devices.
Specimen

A short document about writing things down to last, built from the same elements this sample exercises: heading, list, blockquote, inline code.

The default line is Marcus Aurelius (blockquote); the rest is original, Meditations, Book 10 (blockquote only). Public domain, like every sample on this site.

Questions

Questions about converting Markdown to PDF

Is Markdown to PDF free here, and does it watermark the output?

It is free, accepts Markdown files up to 5 MB, and adds no watermark. The PDF is written by your browser's own print engine, so there is no per-document service cost to recover and nothing is stamped on the page to advertise a paid upgrade.

Why does this open a print dialog?

Because the browser already contains a good PDF writer, and using it means your document never leaves the machine. Choose Save as PDF as the destination rather than a printer.

Can I control page size and margins?

Yes, through the print dialog, which is where your browser exposes them. We do not override those settings, so what you pick is what you get.

Why do my code blocks lose their background colour?

Print dialogs default to leaving backgrounds out to save ink. Turn on the background graphics option, usually filed under more settings, and the shading comes back.

What Markdown syntax actually gets rendered?

Headings, bold and italic, inline code, fenced code blocks, ordered and unordered lists including nesting, blockquotes, links, horizontal rules and GFM tables. That is the syntax the preview shows and the print pipeline receives; anything outside that list is treated as plain text rather than guessed at.

Does it support Mermaid diagrams or math notation?

No. A ```mermaid fence prints as an ordinary code block with the diagram source visible as text, and LaTeX or MathJax notation prints as the literal characters you typed rather than a rendered equation. Neither is parsed.

What happens if I paste raw HTML into the Markdown?

It prints as visible text — a <div> shows up as the literal characters "<div>" rather than becoming a real element. Nothing you paste here is ever executed as markup or script, which is a safety boundary rather than an oversight: this tool renders Markdown, not arbitrary HTML.