Markdown
to PDF

Turn a markdown file into a PDF with page numbers, a title page and a linked contents page. The PDF is made in your browser, so the file never leaves your device.

Updated

ExportSave as PDF
Paper
A4Letter
Margins
NarrowNormalWide
Typeset
ModernEditorialTechnical
Title pageTitle, subtitle, author and date from the frontmatter
On
ContentsLinked to each section
Off
Page numbers
On
Running headerThe document title atop each page
On

Then press ⌘P or CtrlP

§01

Convert a markdown file to PDF

  1. Open the file

    Drop a .md file onto RenderMD, open it from the menu, paste its text, or open it from a GitHub link.

  2. Open Save as PDF

    Press ⌘ P on a Mac or Ctrl P on Windows and Linux, or choose Export → PDF document.

  3. Set up the pages

    Choose the paper, margins and typeset, and turn on the title page, contents, page numbers and running header you want. The preview beside the settings updates as you go, and RenderMD remembers your choices.

  4. Save

    Select Save PDF. Your browser’s print dialog opens with the pages laid out; choose Save as PDF as the destination. The file is named after the document’s title.

§02

Page setup

SettingChoices
PaperA4 or Letter. The default follows your browser’s language and region.
MarginsNarrow, Normal or Wide.
TypesetModern (Hanken Grotesk), Editorial (Newsreader) or Technical (Geist Mono).
Title pageThe title, subtitle, author and date from the frontmatter.
ContentsA page listing the headings, each one a link to its page. Needs at least two headings.
Page numbersA folio at the foot of each page.
Running headerThe document’s title at the top of each page.

Page numbers and the running header need Chrome or Edge. In other browsers, the print dialog can add its own.

§03

A title page from frontmatter

Put the details at the top of the file between --- lines. RenderMD reads title, subtitle (or description), author (or a list of authors) and date. A date written as 2026-03-14 is printed in full.

yaml
---
title: Quarterly report
subtitle: Q1 2026
author: Jo Rivera
date: 2026-03-14
---

Without a title in the frontmatter, the title page uses the document’s first heading.

§04

Page breaks

To start a new page, put this comment on a line of its own. It doesn’t show anywhere else.

markdown
<!-- pagebreak -->

<!-- page-break --> and <!-- newpage --> work too, and so does the <div style="page-break-after: always"></div> that Typora, Obsidian and other editors write.

RenderMD also breaks pages for you. A heading always stays with the text after it. Code blocks up to 25 lines and tables up to 12 rows stay on one page; longer ones continue onto the next, and a table repeats its header row on each page.

§05

What the PDF keeps

  • Syntax highlighting for code in 200+ languages.
  • Math typeset with KaTeX.
  • Mermaid diagrams, as vector graphics that stay sharp when you zoom.
  • Links, which stay clickable. Contents entries and links within the document go to the right page.
  • Images, sized to fit the page.

The PDF is always printed on white, even when you read in the dark theme, and diagrams switch to their light colours.

Frequently asked

Is my file uploaded to convert it?

No. RenderMD lays out the pages in your browser and your browser saves the PDF. RenderMD’s servers never receive the document.

Why are there no page numbers in my PDF?

Page numbers and the running header use a print feature that Chrome and Edge support and other browsers don’t yet. In Safari or Firefox, turn on headers and footers in the print dialog instead.

Can I convert markdown to PDF without opening the editor?

Yes. Switch to the Read view, which shows only the page, and press ⌘ P or Ctrl P. You don’t have to edit the file first.

Can I export to Word or HTML instead?

For Word, Google Docs or email, use Copy → Formatted text and paste. For a web page, use Download → Web page (.html), which keeps the typeset and theme in one file. The markdown to HTML guide covers both.