Convert Markdown to PDF

FileReshape's Markdown to PDF converter formats a .md file with GitHub-style headings, lists, tables, code blocks and task lists in your browser, and you save the result as a PDF with selectable text through the browser's print dialog. The file is not uploaded. Images that are only linked, not embedded, show as their description, and there is no syntax colouring or direct download button.

Did a file not convert correctly? E-mail [email protected], ideally with a small sample file, and it will be fixed.

Key facts

Why turn Markdown into a PDF

Markdown is how developers, writers and note apps such as Obsidian, Joplin and Typora keep text: readable as plain text, and formatted when an app shows it. Outside those apps a .md file is just a wall of hash signs and asterisks, which is not what you want to email to a client, hand in or print. This tool reads the Markdown in your browser with marked, an open-source parser that follows the GitHub Flavored Markdown rules, and lays it out as a clean document: headings, bold and italic text, numbered and bulleted lists, task lists with check boxes, tables with borders, quotes, and code blocks in a monospaced font that wrap instead of running off the page. The browser's own print engine then writes the PDF, so the text stays sharp and searchable. YAML front matter at the top of the file, used by blogs and static site generators, is left out of the PDF.

How to convert Markdown to PDF

  1. Drop your .md file in the box, or click to choose it. A preview of the formatted document appears.
  2. Pick the page size, margins and text size.
  3. Click Create PDF. In your browser's print dialog, choose "Save as PDF" as the printer or destination and save the file.

What to know about Markdown and PDF

Images that are only linked

Markdown usually points to images by address, such as ![Logo](images/logo.png) or a web link. The tool only has the .md file, not the folder around it, and it does not fetch anything from the web, so such images appear as a small box with their description. Images embedded in the file as data URLs are printed. To get pictures into the PDF otherwise, open the Markdown in an editor that shows the images and print from there.

HTML inside the Markdown

Simple HTML such as <br>, <sup>, <details> or a table written in HTML is kept. Scripts, frames, forms, styles and embedded videos are removed, because they do not belong in a printed document and could be unsafe.

No syntax colouring

Code blocks are printed in a monospaced font with a light frame, but without the colours an editor uses for keywords and strings. Long code lines wrap so that nothing is cut off at the page edge.

Markdown dialects

Tables, task lists, strikethrough and automatic links follow GitHub's rules, which most apps share. Extensions that only some apps have, such as footnotes, math formulas, Mermaid diagrams, wiki links between notes or Obsidian callouts, are shown as their plain text.

About the formats

Markdown

Markdown is a plain-text format for writing formatted documents, created by John Gruber in 2004. Hash signs make headings, asterisks make bold and italic text, and dashes make lists. GitHub, GitLab, Reddit, Obsidian, Notion exports and many documentation tools use it.

  • A .md file is plain text, so it opens in any text editor and works well with version control such as Git.
  • GitHub Flavored Markdown (GFM) adds tables, task lists, strikethrough and automatic links to the original rules.
  • Images are usually linked by address, so they live in separate files next to the .md file or on the web.

PDF

PDF (Portable Document Format) was created by Adobe in 1993 and has been an ISO standard since 2008. A PDF looks the same on every device, which is why it is used for contracts, invoices, forms, manuals and scanned documents.

  • A page can hold text, vector graphics and images, each placed exactly.
  • Scanned documents are usually one image per page.
  • A PDF can be protected with a password that is needed to open or edit it.

Frequently asked questions

Is my Markdown file uploaded?

No. The Markdown is read and formatted by your browser on your own device, and the PDF is written by the browser's print function. Nothing is sent to a server.

How do I get rid of the date and web address on each page?

Turn off "Headers and footers" in the browser's print dialog, usually under More settings. That also removes the page title at the top.

Why do my code blocks have no grey background in the PDF?

Browsers leave out background colours when printing unless "Background graphics" is turned on in the print dialog. The frame around code blocks prints either way.

Can I convert a README from GitHub?

Yes. Download the README.md file and drop it here. Badges and screenshots that are linked from the web show as their descriptions.