Converter · No upload

Convert Markdown to PDF

Drop one or more Markdown files to get a PDF of each, with text you can select and search, clickable links and a bookmark for every heading. Headings, lists, quotes, code blocks, tables and task lists are laid out on Letter or A4 pages, and the conversion runs in this tab.

Status idle Files — Output PDF Network since file read —

Refused by name: files over the 2 MB limit for one file, binary (not a text file: it holds binary data) or empty (this file has no text to print). Characters outside Windows-1252 (arrows, check marks, CJK, emoji) print as ? and the row counts and names them. Images are not fetched: each prints its alt text and is named on the row. Raw HTML prints as plain text and math is not typeset. Takes .md and .markdown.

How this converter works

Your browser reads the file with its File API as UTF-8 text (a file that is not valid UTF-8 is read as Windows-1252, and one marked as UTF-16 as UTF-16, and the row says so). A Markdown parser written for this site follows the CommonMark 0.31.2 specification and adds GitHub's tables, task lists, strikethrough and bare web and email addresses. The page is then laid out at one-inch margins in Helvetica and Courier, the standard PDF fonts every reader carries, so no font is embedded or downloaded. Lines break at spaces and never gain a hyphen; only a word wider than the whole line is cut where the line ends. A link to a web, email, FTP or phone address gets a clickable area over each line of its text, a link to a #heading in the same file jumps to that heading, and each heading becomes a bookmark nested under the heading above it.

To watch the network yourself, open the Network panel in a desktop browser's developer tools and convert a file. On a first visit, you may see the site's pages and code being cached for offline use; those requests do not carry your file. The conversion itself runs in this tab and needs no extra library. This route is first-party throughout and works offline from the first page load. Other ways to check, and what each one covers, are on the methodology page.

The standard fonts cover Windows-1252, so any other character prints as ? and the row names it; bookmarks and the document title keep it. Raw HTML blocks print in the code font as written, front matter (the --- block at the top of a blog post) prints as a code block, footnotes, math and Mermaid diagrams print as written, and a link to a javascript:, data: or file: address, or to a relative path such as docs/guide.md, prints as text. A code line wider than the page wraps and a table wider than the page breaks words mid-word, each counted on the row. Files over 2 MB are refused.

Frequently asked questions

How do I convert a Markdown file to PDF?
Choose Letter or A4, then drop one or more .md or .markdown files on the page, or click the drop area and choose them. Each file becomes its own PDF with a Download link on its row, and Download all saves them one after another.
Can I select and search the text in the PDF?
Yes. The PDF stores its words as text in Helvetica and Courier, so you can select, search and copy them. Links are clickable, and every heading is a bookmark in your PDF reader's sidebar.
Why do some characters print as a question mark?
The PDF uses the standard fonts every PDF reader carries, and they cover Windows-1252: English and Western European letters and common punctuation. Arrows, check marks, Chinese, Japanese, Korean and emoji are outside it, so each one prints as ? and the result row counts them and shows which characters they were. Bookmarks keep them.
What happens to images in my Markdown?
Each image prints as its alt text, and the result row names the image files. A Markdown file only points at its images, and this page reads only the file you give it, so it does not fetch them from your disk or the web.
Can I put several Markdown files into one PDF?
Yes, with Merge PDF. Convert each file here, then add the PDFs to Merge PDF, put them in order and merge. Merge PDF also runs in your browser.

Related tools