How to Convert Markdown to PDF (and HTML)

Updated 2026-06-21

To convert Markdown to PDF, paste your Markdown into a live editor, check the rendered preview, then use Print / Save as PDF to produce a clean, printable document. With Markdown to HTML & PDF this happens entirely in your browser — your text is rendered and sanitized locally and never uploaded.

Convert Markdown to PDF in three steps

  1. Paste or type your Markdown into the editor. The preview on the right updates as you go, so you can see headings, lists, links, and tables render in real time.
  2. Set a Document title. This becomes both the page title and the suggested filename.
  3. Click Print / Save as PDF. Your browser's print dialog opens with only the rendered document visible — choose "Save as PDF" as the destination, then save.

The print step uses your browser's built-in PDF engine, so the result matches what you see in the preview: clean typography, proper page margins, and no app chrome bleeding into the output.

Export clean HTML instead

If you need a standalone web page rather than a PDF, click Download .html. You get a complete, self-contained HTML document with your title baked into the page, ready to open in any browser or drop onto a server. There's also a Copy HTML button if you just want the rendered markup to paste into a CMS, email template, or another file.

Because the HTML is sanitized with DOMPurify before it ever reaches the preview, the copied and downloaded markup is the same safe output — no surprise scripts, even if you paste Markdown from an untrusted source.

Turn on GitHub-flavored Markdown

By default the tool renders standard Markdown. Toggle GitHub-flavored Markdown (GFM) to enable the extras most people expect from a README:

There's a second toggle, Treat single line breaks as line breaks, which is handy when your source uses one line per sentence and you want each on its own line instead of merged into a paragraph.

Common pitfalls and tips

Everything runs client-side, which makes this a safe choice for private notes, internal docs, drafts, and anything you'd rather not hand to a cloud converter.

Ready to convert? Open Markdown to HTML & PDF, paste your Markdown, and export a PDF or HTML file in seconds.

Try the Markdown to HTML & PDF →