Skip to content

Practical guide 5 min read

How to convert Markdown to PDF or Word

Save a Markdown file as a PDF or an editable Word document: page size, a cover page and contents, page breaks, and what to do about missing pictures.

PDF or Word?

Choose a PDF when the document is finished and people only need to read, print or sign it. It looks the same on every device, and its text stays selectable and searchable.

Choose Word when someone needs to edit the document, add comments or track changes, or when a form or a client asks for a .docx. Google Docs, Pages and LibreOffice open it too.

Both converters run in your browser and need no account. If you're still writing, the Markdown Editor does both from its Export menu.

Markdown to PDF, step by step

  1. Open Markdown to PDF and paste your Markdown, or drop a .md file onto the box.
  2. Pick a Theme, Page size, orientation, margins and Text size. The preview shows the document at the width of your page.
  3. Tick any extras you need: Page numbers, Cover page, Table of contents or New page for each H1.
  4. Select Print / Save PDF. In the print window, choose Save as PDF as the printer (on Windows, Microsoft Print to PDF works too), check the pages, and save.

The browser's own print engine makes the PDF. That's why there's a print window, and also why links keep working and every language and emoji comes out right.

Making the pages look right

Themes. GitHub looks like a README on GitHub, Clean is a roomy modern style, Academic uses a serif typeface and justified text suited to reports and papers, and Compact fits more on each page.

Page size. A4, US Letter, US Legal, A5 or A3, in portrait or landscape. Wide tables and code usually fit better in landscape.

Page breaks. Put this on a line of its own wherever a new page should start:

<!-- pagebreak -->

Or tick New page for each H1 to start every top-level heading on a fresh page. The layout also asks the browser to keep each heading with the text after it, and to move a code block, quote, table row or picture to the next page rather than split it, when it fits on one page.

Page numbers are printed at the foot of each page in Chrome and Edge. Other browsers print the same document without them, so use Chrome or Edge if you need numbered pages.

A cover page and a table of contents

Cover page adds a title page. It takes the title from front matter: a block of settings between two --- lines at the very top of the file.

---
title: Quarterly Product Report
subtitle: July to September
author: Ada Lovelace
date: October 2026
---

# Highlights

Without front matter, the cover uses the document's first heading as its title. Table of contents adds a linked list of the document's headings, down to the third level (###), after the cover.

Markdown to Word, step by step

  1. Open Markdown to Word and paste your Markdown, or drop a .md file onto the box.
  2. Choose the Page size, margins, Font (Calibri, Aptos, Arial, Georgia, Times New Roman or Cambria) and Text size, and whether pages are numbered.
  3. Select Download .docx and open the file in Word, Google Docs, Pages or LibreOffice.

What comes across to Word

In Markdown In the Word document
# to ###### headings Word's Heading 1 to Heading 6 styles, so they show in the Navigation pane and in a table of contents you add in Word
Bulleted, numbered and nested lists Real Word lists that keep numbering
Tables Word tables, with the header row shaded
Links, including links to sections Working hyperlinks
Footnotes Word footnotes at the foot of the page
Code blocks A shaded block in Consolas, in a style named Code
Task lists ☐ and ☑ in front of each item
Alert boxes such as > [!NOTE] A quote with a coloured bar down the side
Maths The formula as written, in italics: Word can't read LaTeX
Mermaid diagrams The diagram's code, as a code block

Headings, code and quotes use named styles, so you can restyle all of them at once in Word, and Word to Markdown recognises them if the document comes back.

When pictures are missing

A web page can only read pictures that are on the web, so how you add them matters:

  • Pictures with a full web address (![Chart](https://example.com/chart.png)) are included in both the PDF and the Word document. A few sites block other pages from downloading their pictures; Markdown to Word lists any it couldn't fetch, so you can save them and insert them in Word.
  • Pictures with a path on your computer (![Chart](images/chart.png)) can't be read by a web page, so they're left out.
  • Pictures pasted or dropped into the Markdown Editor are kept in your browser with the document and go into the PDF, the Word file and the HTML when you export from the editor. For a document with local pictures, this is the easiest route.

Going the other way

To turn a Word document back into Markdown, use Word to Markdown: headings, lists, tables, links and bold or italic text convert, and pictures can stay inside the Markdown, go into a .zip of separate files, or be left out. For a web page or text copied from Google Docs, paste it into HTML to Markdown.

Where your document goes

Your Markdown is converted in your browser, and the PDF or Word file is made on your device. It isn't uploaded to LabAnvil or anyone else. The page still loads website assets, and analytics may apply as explained in the privacy policy.

Ready to put it into practice?

Explore the tools →More guides →

A little guidance

All guides

Search by name, description or tag. Press Enter to see every match.