Convert Markdown to PDF
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
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.
How to Use Convert Markdown to PDF
- 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.
- 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.
- Check the preview. A note under the editor lists any images it could not find.
- 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~~ |
|
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
@pagerule 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  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.
Related Tools
Base64 to PDF Decoder And Viewer →
Decodes Base64 or a data:application/pdf URI into a PDF you can preview and download,…
Compress PDF →
Optimize and shrink a PDF in your browser by re-saving it efficiently and stripping…
Crop PDF →
Trim the margins off every page of a PDF by a percentage and download…
Convert CSV to Markdown Table →
Convert CSV to GitHub-flavored Markdown table with per-column alignment, HTML preview, delimiter auto-detect. Free,…
Convert CSV to PDF Table →
Convert CSV to formatted PDF tables in your browser. Custom orientation, font size, alternate…
Delete PDF Pages →
Remove the pages you do not need from a PDF and download the smaller…
Extract PDF Pages →
Pick the pages you want and save them as a new PDF. Runs in…
Flatten PDF →
Flatten a filled PDF form so the fields become fixed and can no longer…
HTML to Markdown Converter →
Converts HTML into GitHub Flavored Markdown: headings, nested and numbered lists, task lists, tables…
Convert JSON to PDF Report →
Convert JSON data to formatted PDF reports instantly. Free JSON to PDF converter with…
Markdown Escape Tool →
Escape Markdown special characters so symbols show literally instead of becoming formatting.
Markdown Link Checker →
Extract and check the links in a Markdown document, flagging empty or malformed URLs.