Markdown to PDF Converter
Convert Markdown to PDF with a live preview. Tables, task lists, code highlighting, footnotes and LaTeX math, with ChatGPT output supported. Private.
Page and text
The print window opens with only your document: choose Save as PDF as the destination.
How to convert Markdown to PDF
Paste your Markdown into the left box, or press Open file… to load a
.md file. The preview updates as you type; when it has room, it lays the
text out at the page’s real width, so lines wrap where they will in the
PDF. Pick a page size, margins, font and text size, then press Save as
PDF…. Your browser’s print window opens with only the document in it;
choose Save as PDF as the destination.
| Browser | Where to find Save as PDF |
|---|---|
| Chrome, Edge, Brave | Destination (or Printer) → Save as PDF |
| Firefox | Destination → Save to PDF |
| Safari on a Mac | The PDF menu at the bottom left → Save as PDF |
| iPhone and iPad | Options or Share → Save to Files |
| Android | Select a printer → Save as PDF |
The PDF is drawn by the browser itself, so its text is real, selectable and searchable, and links stay clickable. If the date, page title and web address appear at the top and bottom of each page, turn off Headers and footers in the print window. With Page numbers ticked, Chrome and Edge print “3 / 12” at the foot of each page (any margin but None).
Supported Markdown
The converter follows GitHub Flavored Markdown: headings, bold, italic,
strikethrough, links and bare web addresses, ordered, bulleted and
nested lists, task lists (- [x] done), block quotes, tables with column
alignment, horizontal rules and images. Fenced code blocks with a language
name, such as python or sql, are colour-highlighted for about 60
languages. Footnotes use [^1] in the text and a [^1]: note line
anywhere in the file, and are numbered and collected at the end.
Math from ChatGPT and other assistants
With Render LaTeX math ticked, formulas between single dollar signs
are shown inline and formulas between double dollar signs are shown on
their own line. The \( … \) and \[ … \] delimiters that ChatGPT and
other assistants produce work too, as do fenced math blocks and
\begin{align} environments. Prices such as “$5 and $10” stay plain
text: as in Pandoc, a closing dollar sign may not follow a space or come
right before a digit, and \$ always gives a literal dollar sign.
Formulas are typeset with KaTeX, which covers most of LaTeX math mode; an
unknown command is shown in red instead of stopping the page.
Page breaks, images and files
- A line with only
\newpageor<!-- pagebreak -->starts a new page. New page for each top-level heading does this before every#heading after the first. - Pictures written into the Markdown as
data:addresses always show. For files next to your.mdfile, such asimages/chart.png, open or drop the image files too; they are matched by file name. - Images from other websites are not loaded until you tick Load images from the web, because fetching them tells that site you opened the document.
- YAML front matter at the top of a file is removed, and its
titlebecomes the file name.
Safe with any Markdown
Markdown may contain raw HTML. Before anything is shown, the HTML is
cleaned with DOMPurify: scripts, event handlers such as onerror,
javascript: links, frames, forms and style sheets are removed, so a
pasted document cannot run code in this page or in the downloaded HTML.
Download HTML saves the same document as a single web page with its styles built in, handy for email or a website. Formulas in it are stored as MathML, which current browsers display without extra files.
Frequently asked questions
Is my Markdown uploaded to a server?
No. Rendering, highlighting and the PDF all happen in your browser on your own device. Nothing you type or open is sent anywhere or stored.
Is the text in the PDF selectable?
Yes. The browser prints the document as real text with embedded fonts, not as a picture, so you can select, copy and search it, and links stay clickable in Chrome, Edge and Safari.
How do I remove the date and web address from the PDF pages?
Those are the browser’s own print headers. In the print window, open More settings (Chrome and Edge) or the print options (Firefox) and untick Headers and footers.
Why does my ChatGPT answer show dollar signs or brackets instead of formulas?
Make sure Render LaTeX math is ticked. Formulas need one of the delimiters $…$, $$…$$, \( … \) or \[ … \]. Text selected and copied from the chat window often loses the backslashes and dollar signs, so copy the answer with the assistant’s own copy button, which keeps the Markdown.
Can I convert Markdown to PDF on my phone?
Yes. On Android choose Save as PDF as the printer. On an iPhone or iPad, tap Save as PDF…, then share the print preview to Files.