Markdown to PDF
Turn Markdown into a well set PDF: pick a preset or set the paper, margins, fonts, colours, page breaks, title page, contents, headers and footers yourself, and save your settings as a preset file.
About this tool What it's for, how to use it and an example
What it's for
Make a PDF that looks properly typeset from text you’ve written in Markdown, the plain-text format with #
headings and *emphasis* that many notes and writing apps export. Start from a preset, such as a report with a
title page and contents, a double-sided A5 book or an academic paper, then change any detail. Save your settings
as a preset file so every document you make looks the same, or share it with others who use this tool.
For example, when you write meeting reports in a notes app, export one as Markdown, open it here with your team’s preset file, and save a PDF with your colours, a title page and page numbers.
How to use it
Pick a Preset, then type, paste or open the Markdown (several files are joined in name order). The title,
subtitle, author and date can come from the fields or from front matter at the top of the text (title:,
subtitle:, author: and date: between two --- lines). With no title given, the first # heading is used.
- Settings: open a group to set the paper, margins, columns, fonts, spacing, headings, colours, code, quotes, tables, pictures, breaks and dividers, title page, contents, and the text in the header and footer.
- New pages: put
\newpageor<!-- pagebreak -->on a line of its own, start them at headings, or tick New page at---lines under Breaks and dividers (a---line is a thin rule otherwise). - Ornaments: a line of just
-+-becomes a centred ornament in the accent colour, such as* * *or ⁂, set in A -+- line shows under Breaks and dividers (leave it empty for a blank space). - Pictures and font files: add the picture files that
lines name (matched by file name), and a font file if the one you want isn’t installed. You can drop a file on the box it’s for.
The preview updates as you type. Save as PDF… opens the browser’s print window: choose Save as PDF as the
destination. Save preset to a file downloads the settings as a .mdpdf.json file, which Load a preset
file reads back. Your settings and the author are remembered in this browser; changing any setting switches the preset
menu to Your own settings.
Example
Press Try an example, choose the Report preset, then Save as PDF…. In the print window you’ll see four
pages: a dark blue title page reading Harbour Survey, Spring inspection and Ann Example, a contents page,
then 1 Summary and 2 Next steps, each on a new page with numbered sections, the title in the header and the
author and page number in the footer.
Good to know
Headers and footers are printed only by Chrome and Edge; other browsers leave them out. The page count includes the title page. The preview shows one long page with dashed lines where new pages start, and the print window shows the real pages, so check them there before saving. If the browser adds its own date and address to the page, untick Headers and footers in the print window.
A preset stores font names, not font files: a font chosen as Another font on this computer, or added as a file, must be on, or added again on, the computer that uses the preset. Pictures from the web aren’t fetched, so their descriptions appear instead. Contents entries are links but have no page numbers. HTML inside the Markdown is kept, without scripts or frames.
Guides: Turning notes or a Word document into a polished PDF report · Publishing an ebook that stores accept
Built with The third-party code and data this tool uses, and their licences
This tool runs on the following open-source work, copied onto this site and served from it:
- marked 15.0.12
- Copyright
- Copyright (c) 2011-2025, Christopher Jeffrey
- Licence
- MIT License
- Source
- github.com/markedjs/marked
Every page also uses Montserrat (SIL Open Font License 1.1).
Everything the site uses is on Credits and licences.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.