Guides / Documents
How to Convert Markdown to PDF, DOCX or HTML
Last reviewed October 12, 2026
Markdown is the easiest way to write structured text, but most people you share with want a PDF or a Word file. Anvil converts Markdown into a neatly styled PDF, a DOCX document or an HTML page in one step.
Convert Markdown in four steps
- Open the Documents tool.
- Drop your .md file onto the upload area (up to 50 MB).
- Under From choose Markdown, then under To choose PDF, DOCX or HTML.
- Press Convert and download the result.
What the PDF looks like
Markdown to PDF is styled on purpose, so you do not have to design anything. Pages are A4 with 2 cm margins, the body is set in a clear sans-serif font at 11 point with comfortable line spacing, and headings get a light rule underneath. Code blocks sit on a soft grey background in a monospaced font and wrap long lines instead of running off the page. Tables get borders and a shaded header row, block quotes get a vertical bar, and links are coloured so they stand out.
The result is readable straight away, for meeting notes, project documentation, study material, README files or a draft you want to send for review.
Markdown that converts well
- Use one top-level heading (a single # line) for the title, then ## and ### for sections so the hierarchy is clear.
- Leave a blank line before and after lists, tables and code blocks. Missing blank lines are the most common reason a list turns into a paragraph.
- Use fenced code blocks (three backticks above and below) for code so spacing is preserved.
- Write tables with pipes and a separator row of dashes under the header.
- Use full web addresses for links. Images that point to files on your own computer cannot be included, so keep the document mostly text and tables.
Markdown to DOCX and HTML
Choose DOCX when someone needs to edit the document in Word, for example to add tracked changes. Headings, lists, tables and formatting become native Word styles.
Choose HTML to get a web page you can paste into a CMS, an email template or a documentation site. You can also go the other way: the Documents tool converts HTML and DOCX back into Markdown, which is handy for moving content into a wiki or a static site.
Common questions
Does it support GitHub flavoured Markdown? Tables, fenced code blocks and task style lists are handled by the underlying converter, pandoc. Very new or unusual extensions may be shown as plain text.
Can I change the fonts or margins? Not in Anvil. If you need a custom design, convert to HTML and style it yourself, or convert to DOCX and adjust the styles in Word.
Is my text stored? No. The file is converted in a temporary folder and deleted straight after the download. See the privacy page.
Try it now
Open the Documents tool. It is free, needs no account, and your files are deleted right after conversion.