How to convert a Markdown file to PDF
Open the .md file with the Open button, drop it on the page, or paste its text in the editor. The preview on the right lays the document out on real pages as you type, with the size, margins and page numbers of the PDF, so there is no surprise when you open the file. Pick a theme, choose A4 or US Letter and the margins, turn the table of contents on or off, then press Download PDF. Several files at once give one PDF each in a ZIP, or one PDF that joins them in the order of the tabs, each starting on a new page.
What Markdown is supported
Everything GitHub reads: headings, paragraphs, bold, italic, strike-through, inline code, links and automatic links, bulleted and numbered lists nested to any depth, task lists with ticked boxes, quotes, horizontal rules, tables with left, centred or right-aligned columns, code blocks with the colours of their language, and pictures. Simple HTML found in README files (centred paragraphs, line breaks, bold, superscript) keeps its text. Mermaid diagrams and LaTeX formulas are not drawn yet: they are printed as code, word for word.
Pictures in the PDF
A picture written as  is found by its file name: drop chart.png on the page with the Markdown, or drop it while writing to insert it at the cursor. PNG and JPEG are embedded as they are; WebP, GIF, SVG and BMP are redrawn as PNG. Pictures written inside the text as data URLs work too. A picture on another website cannot be fetched by your browser from this page: the PDF shows a framed note with its description in its place, so nothing disappears without a trace.
Save a ChatGPT, Claude or Gemini answer as a PDF
Chat assistants write their answers in Markdown. Use the copy button under the answer (not a selection of the page), paste it in the editor and download: headings, lists, tables and code come out as they were in the chat, on clean pages you can send or print.
For a long conversation, paste each answer you want to keep one after the other, with a page break between them, and turn on the table of contents to find them again.
How to add a page break in Markdown
Markdown has no page break of its own. Put the cursor where the new page should start and press Page break: the editor inserts an HTML comment reading pagebreak on its own line. It stays invisible on GitHub and in other viewers, and starts a new page here. The spellings page-break, \newpage and \pagebreak used by other converters work too.
Without manual breaks, “Don't split code and tables” moves a code block, a table or a short paragraph that would be cut to the next page, and a heading is never left alone at the bottom of a page.
Table of contents, bookmarks and page numbers
With Table of contents on, the PDF lists the headings of levels 1 to 3 after the title, each with its page number; a click on an entry opens that page. Write [TOC] on its own line to place the contents elsewhere. When the document starts with a single main title, the contents leave it out.
Every heading also becomes a bookmark in the PDF reader's side panel, nested by level. Page numbers are written at the foot of each page as “3 / 12”, and “Header with the title” repeats the document's first heading at the top of every page but the first.
Four themes, two page sizes, three margins
GitHub looks like a README on GitHub: a clean sans-serif, headings underlined, grey code blocks. Article sets the text in a serif font with a centred title, for reports and essays. Plain is black on white with no colour, for forms and documents that will be printed in black and white. Modern uses a geometric heading font, indigo headings and dark code blocks.
Pages are A4 (210 × 297 mm) or US Letter (8.5 × 11 in), with narrow (12.7 mm), normal (20 mm) or wide (25.4 mm) margins. Your choices are remembered on this device when you are signed in.
Code blocks with syntax highlighting
Name the language after the three backticks (js, ts, python, bash, sql, json, yaml, html, css, go, rust, java, c#, php, ruby…) and the code gets its colours, in the PDF and in the preview. Long lines wrap inside the block instead of running off the page; spaces and indentation are kept exactly.
A block whose language is not named stays in one colour. Inline code gets a light background, like on GitHub.
Convert a GitHub README to PDF
Download README.md from the repository (the Raw button, then save) and open it here with the pictures of its folder. Relative links between files stay as text; links to headings of the same file (#installation) work in the PDF.
Badges and screenshots hosted on other sites cannot be fetched by your browser here: download the ones you need and drop them with the file.
Why not just print the page to PDF?
A browser's “Print to PDF” cuts code blocks and tables across pages, adds the address and the date in the margins, and gives no bookmarks. Here every line is placed on the page before the PDF is written: what you see in the preview is exactly what the file holds.
If you prefer the browser's printing, the HTML button saves the document as a web page with its theme and print rules (page size, margins, blocks kept whole).