Home Tools Blog About

Convert Markdown to PDF

In short

Write or paste Markdown, see the formatted page as you type, and save it as a PDF through your browser’s print window. GitHub-style tables, task lists and coloured code blocks are supported.

  • Runs in your browser
  • Nothing uploaded
  • Free, no sign-up
Preview

Loading the Markdown engine…

Save as PDF opens your browser’s print window. Pick Save as PDF (or Microsoft Print to PDF) as the printer. The PDF keeps real, selectable text and working links.

Your text stays in this tab. The page loads marked, DOMPurify and highlight.js from cdnjs to read Markdown, clean HTML and colour code. Images given as web links load from their own sites.

🛡
Private by designYour files and text stay in this tab
⚡
Runs in your browserNo waiting for a server
💧
No watermarksClean output you can use
🆓
FreeNo account needed

How to Use Convert Markdown to PDF

Convert Markdown to PDF · free online tool · All Tools Verse
The Convert Markdown to PDF tool, as it looks in your browser.
  1. Paste your Markdown or click Open file to load a .md file. If it uses local images, drop those image files on the editor too.
  2. Pick the page size, margins, font and text size. Tick a table of contents, a new page for each top heading, or page numbers if you want them.
  3. Check the preview. A note under the editor lists any images it could not find.
  4. Click Save as PDF. In the print window choose Save as PDF (or Microsoft Print to PDF) as the printer, then save.

Example: release notes on one A4 page

The Sample button loads short release notes with a heading, a bullet list, a task list, a table with right-aligned number columns, a JavaScript code block, a quote and a link. The status line reads “136 words · 5 headings · 1 table · 1 code block”.

With A4, Normal 20 mm margins and 11 pt text, Save as PDF gives a single page. We rendered the same print copy with Chrome’s PDF engine and ran pdftotext on it. The text came back as real text, starting:

Project Atlas: Release Notes 2.4
Version 2.4 ships faster exports, a cleaner settings page and dark mode. Full details are in the
changelog.


Highlights
   PDF export is about 3 times faster on long reports
   New dark mode that follows your system setting

The changelog link is still clickable in the PDF, the code keeps its colours, and the footer shows the page number as “1 / 1”.

What prints, and what does not

We ran each line below through the converter’s Markdown engine (marked 12, GitHub mode):

You write In the PDF
| a | b | with a |:-|-:| row A table, with left and right aligned columns
- [x] Done and - [ ] To do Ticked and empty checkboxes
A fence starting ```js A code block coloured for JavaScript; long lines wrap
~~old~~ old (strikethrough)
www.example.com A clickable link
Two spaces at the end of a line A line break
<kbd>Ctrl</kbd> and other plain HTML Kept; scripts, event handlers and inline styles are removed
H~2~O Careful: GitHub mode reads single tildes as strikethrough, so the 2 is crossed out
Footnotes [^1] Not supported; they show as plain text
Maths $x^2$ Not rendered; shows as typed
```mermaid diagrams Shown as code, not drawn
> [!NOTE] callouts Shown as an ordinary quote

How it works

  • Three libraries load from cdnjs: marked 12.0.2 reads the Markdown, DOMPurify 3.1.6 strips anything unsafe from the HTML, and highlight.js 11.9.0 colours code when the fence names a language. Your text is not sent anywhere.
  • Save as PDF builds a print copy of the document with a CSS @page rule for the page size and margins, then opens your browser’s print window. The browser writes the PDF, so the text stays real text and links keep working.
  • The print styles ask the browser to keep each heading with the text below it and not to split table rows or images across pages. Long code lines wrap instead of running off the edge.
  • Start each top heading on a new page adds a page break before every # heading after the first. The preview marks those breaks with a dashed line.
  • Page numbers use CSS page margin boxes. Chrome and Edge print them; Firefox and Safari skip this setting, but their own print windows can add headers and footers.
  • Chrome suggests the document title as the PDF file name. The tool uses the PDF file name box, or the first heading if the box is empty.

Limits

  • Footnotes, maths, Mermaid diagrams and GitHub callouts are not rendered (see the table above).
  • Images given as web links are loaded from their own sites. Images with a local path appear only after you drop those image files on the editor.
  • The preview is one long page. The exact page breaks are decided by the browser when it prints.
  • The PDF is made through the print window, so it needs one extra click there. There is no direct file download of the PDF itself.

Frequently asked questions

Is the text in the PDF searchable?

Yes. The browser prints real text, not a picture of the page, so you can search, select and copy it Links stay clickable.

How do I convert a README.md that has images?

Click Open file and choose the README and its images together, or drop them on the editor. Images are matched by file name, so ![Chart](docs/chart.png) uses the chart.png you dropped. The note under the editor lists any that are still missing.

How do I remove the date and web address printed at the top and bottom?

They come from the browser, not the tool. In Chrome or Edge, open More settings in the print window and untick Headers and footers.

Can I get a Word or HTML file instead?

Download HTML saves a single web page with the same styling, and local images are embedded inside it, so it opens on any computer. Word can open that HTML file and save it as .docx.

Keep going

Related Tools

All Document tools →
Share

Embed this tool

Add this free tool to your website. Copy and paste the code: