Markdown to PDF
Type, paste or open a Markdown file and download a PDF with real, selectable text, made in your browser so your document never leaves your device.
How to convert Markdown to PDF
Add your Markdown
Paste or type it in the Markdown box, or choose Open .md file. To include pictures, add its PNG or JPEG images with it, or add the whole folder: drop it on the page or choose Open folder.
Choose the page
The Preview beside the text (a tab on a narrow screen) shows your document as a page. Open Page options to choose the paper size, orientation, margins, font (Sans or Serif), text size and page numbers.
Download the PDF
Choose Download PDF. The file is named after your .md file or, for text you typed or pasted, after its first top-level heading.
Or print it to a PDF
If the document has math, or text the PDF fonts cannot draw, the tool says so and makes Print / Save as PDF the main button. In the print dialog, choose Save as PDF as the destination.
To read a file without making a PDF, use the Markdown viewer. To get the HTML instead, use Markdown to HTML.
A real PDF, made on your device, with no daily limit
Some online converters limit how many free PDFs you can make a day, add a watermark after that, or send your document to their server to print the PDF there. This page does none of these. The PDF is written by code in the page, on your own device: there is no limit on how many you make, no watermark is added to the file, and your document is never uploaded. Once the page has loaded, it also works with no internet connection.
The text in the PDF is real text in embedded fonts, not a picture of the page. You can select it, search it and copy it, links can be clicked, and the headings become the PDF's bookmarks. How it works explains how the PDF is made and tested, and how to check for yourself that nothing is uploaded.
Tables, code blocks and task lists
The converter reads CommonMark, the standard form of Markdown, with the additions of GitHub Flavored Markdown: tables, task lists, strikethrough and web addresses that become links. Footnotes work too.
Tables keep their column alignment, and a table longer than a page repeats its header row at the top of each page. Code blocks are set in a monospace font, in the colors of their language when the code fence names one (```js, for example), and long lines wrap instead of running off the page. Nested lists, block quotes and horizontal rules are kept. Mermaid diagrams are not drawn: their code is shown as a code block.
Markdown to PDF with images
PNG and JPEG images that are on your device go into the PDF at their own size, or shrunk to fit the page if they are larger. Add the .md file together with its images, or the whole folder, and the tool matches each image by the path written in the Markdown, then by its file name if only one image has that name. If an image is not found, a note under the buttons names it. Other image types, such as GIF, WebP and SVG, are not read: save them as PNG first. Each image can be up to 16 megapixels and 24 MB.
Images on other websites are not loaded, because loading one would contact that site. The tool says how many there are. Choose Load remote images to show them in the preview. The downloaded PDF still leaves them out and says so; Print / Save as PDF includes them once they are loaded.
Page size, margins and page breaks
Choose Letter, A4 or Legal, portrait or landscape, and narrow, normal or wide margins (half an inch, three quarters of an inch or one inch). The paper starts at Letter if your browser's language setting is for the United States, Canada or Mexico, and at A4 otherwise. You can also choose a sans-serif or serif typeface (Inter or Source Serif 4), text of 10, 11 or 12 points, and page numbers at the foot of each page. Your choices are remembered on your next visit.
To start a new page at a set point, put <!-- pagebreak -->, \newpage or <div class="page-break"></div> on a line of its own. A heading is not left alone at the foot of a page: it moves to the next page with the text that follows it.
Math, Chinese, Arabic and emoji
Math written between $ signs, $$, \( and \), or \[ and \] is typeset in the preview. The PDF from Download PDF does not typeset it in this version: it writes each formula as its source, in the code font. So when a document has math, the tool says so and makes Print / Save as PDF the main button. Your browser then prints the preview, with the math typeset, to a PDF.
The same goes for text the PDF fonts cannot draw. They cover the Latin alphabet with most accented letters, and Greek and Cyrillic, but not Chinese, Japanese, Korean, Arabic, Hebrew, Devanagari, Thai or emoji, among others. When a document has such text, the tool names the script and makes the print route the main button, because your browser draws that text in the preview with its own fonts.
Save a ChatGPT, Claude or Gemini answer as a PDF
If text you copied from ChatGPT, Claude or Gemini shows # before headings, ** around words or lines of ``` around code, it is Markdown. Paste it into the Markdown box: the preview shows the headings, lists, tables and code as they should look, and Download PDF saves them as a formatted PDF.
This makes a PDF of the text you paste. It does not export a whole conversation from the chat app. For that, copy each answer you need, or use the app's own export if it has one.
Frequently asked questions
Is this Markdown to PDF converter free?
Yes. There is no account, no daily limit and no watermark, so you can make as many PDFs as you need.
Is my Markdown uploaded to a server?
No. The PDF is made in your browser, and your document, its images and its file name never leave your device. The site counts visits with Google Analytics, which never receives your text, your files or their names.
How do I convert a README.md to PDF?
Drop the README.md file together with the images it uses, or the folder that holds them, then choose Download PDF. PNG and JPEG images written with relative paths, such as docs/screenshot.png, are matched to the files you dropped. Images hosted on other websites are left out of the downloaded PDF.
Is the text in the PDF selectable?
Yes. The PDF holds real text in embedded fonts, so you can select, search and copy it, and links can be clicked. It is not a picture of the page.
Why won't my R Markdown knit to PDF?
The rmarkdown documentation says that creating PDF output from R Markdown requires LaTeX to be installed, so check that first. This page does not run R. Open .md file and drop take .md, .markdown and .txt files only, so paste the text of an .Rmd file instead. You get a PDF of it as plain Markdown: the YAML header at the top is left out and each R chunk is shown as code, without its results or plots.
Can I use pandoc instead?
Yes, if you work on the command line. Pandoc's manual gives pandoc test.txt -o test.pdf and says that by default pandoc uses LaTeX to create the PDF, which requires a LaTeX engine to be installed. This page needs nothing installed.
Can I convert several Markdown files at once?
Yes. Open or drop several .md files and each one is listed by name above the editor: choose a name to switch to that file. Download all PDFs (ZIP) saves one PDF per file, with the options you chose.
How do I open a .md file?
To read it formatted, open it on this site. How to open an MD file also gives the steps for Notepad, TextEdit, VS Code and Google Docs.
Can I turn a PDF into a Markdown file here?
No. This tool works in one direction, from Markdown to PDF or HTML.