Markdown to PowerPoint: Convert .md to .pptx Slides
September 11, 2026 · 9 min read
Markdown to PowerPoint: Convert .md to .pptx Slides (3 Methods)
Converting markdown to powerpoint comes down to one choice: do you need slides you can edit in PowerPoint afterwards? Pandoc and md2pptx write native text boxes, so yes. Marp's default .pptx export is a deck of slide images, so no. This tutorial converts the same deck all three ways and shows how each tool splits slides and handles notes, tables, and images.
Which Markdown to PPT Tool Should You Use?
The three tools below are deterministic converters: the same Markdown gives the same deck every time. AI slide generators also rank for this search, but they rewrite your content, so we've left them out.
| Tool | Output in PowerPoint | Slide breaks | Speaker notes | Best for |
|---|---|---|---|---|
| Pandoc 3.x | Native, editable text and tables | Headings at slide level, plus --- | ::: notes blocks | Corporate templates via --reference-doc |
| Marp CLI | Slide images (editable mode is experimental) | --- only | HTML comments | Designed decks with CSS themes |
| md2pptx | Native, editable text via python-pptx | #, ##, ### heading levels | Not a core feature | Python shops wanting template control |
We prefer Pandoc for anything that will be handed to someone who edits in PowerPoint. Marp wins when you care about how the slides look and will present from the PDF or HTML anyway.
The reason a Markdown PowerPoint workflow is worth the setup is version control. A deck stored as deck.md diffs cleanly in Git, gets reviewed in a pull request, and rebuilds in CI whenever the numbers change. A binary .pptx does none of that. The limitation is layout: none of these tools gives you drag-and-drop positioning, so decks with heavy custom design still end in PowerPoint itself.
The sample deck used for every method
Every conversion below uses this file, saved as deck.md. It has a metadata block, a section heading, bullets, a table, speaker notes, and a horizontal rule, which is enough to expose the differences.
---
title: Quarterly Update
author: Dana Lee
date: 2026-09-11
---
# Results
## Revenue
- Up 12 percent on Q2
- Two new markets
::: notes
Pause here for questions.
:::
## Pipeline
| Region | Deals |
|---|---|
| EMEA | 14 |
| APAC | 9 |
---
## Next Steps
1. Hire two engineers
2. Ship the export feature
Draft your own deck in the editor below before converting. The preview shows the heading hierarchy, which is what Pandoc and md2pptx use to decide where slides start.
Method 1: Pandoc Markdown to PowerPoint
Pandoc is the general-purpose document converter; install it from pandoc.org or with brew install pandoc. Our Markdown to Word guide covers installation in more detail. The conversion is one command:
pandoc deck.md -o deck.pptx
We ran this with Pandoc 3.8.2.1 and opened the result in PowerPoint. The sample produced five slides:
- A Title Slide built from the
title,author, anddatemetadata. - A Section Header slide for
# Results. - Title and Content slides for Revenue, Pipeline, and Next Steps, each with editable text.
- A real PowerPoint table on the Pipeline slide, not a picture of one.
- The
::: notesblock landed in the Revenue slide's speaker notes, visible in Presenter View.
How Pandoc decides where slides break
The Pandoc manual defines the slide level as the highest heading level that is immediately followed by content rather than another heading. In the sample, # Results is followed by ## Revenue, and ## Revenue is followed by bullets, so the slide level is 2. Headings above the slide level become section slides; headings at the slide level start new slides; a horizontal rule always starts a new slide. Override the guess with --slide-level=1 if you want every # to be a slide.
Notes, columns, and templates
Speaker notes go in a fenced div with the notes class, as in the sample. For the title slide, put a notes: field in the YAML block instead. Two-column slides use a ::: {.columns} div containing two ::: {.column} divs; Pandoc then picks the Two Content layout, though column widths are ignored for PowerPoint.
The feature that matters at work is --reference-doc. Export your company template from PowerPoint, make sure it contains layouts named Title Slide, Title and Content, Section Header, Two Content, Comparison, Content with Caption, and Blank, then run:
pandoc -o custom-reference.pptx --print-default-data-file reference.pptx
pandoc deck.md --reference-doc=custom-reference.pptx -o deck.pptx
The first line writes Pandoc's default template so you can restyle it; the second converts with your version. Pandoc picks layouts by content. A slide with text followed by an image or table gets Content with Caption, a two-column slide with mixed content gets Comparison, and everything else gets Title and Content.
Method 2: Marp CLI Markdown to PPTX
Marp is a presentation ecosystem built on CommonMark with its own directives and CSS themes. Install the CLI with npm install -g @marp-team/marp-cli or run it once with npx @marp-team/marp-cli@latest. It needs Chrome, Edge, or Firefox installed because it renders each slide in a browser.
Marp ignores heading levels for slide breaks. The only separator is ---, and directives such as theme and pagination sit in front matter or HTML comments. Speaker notes are HTML comments inside a slide. Rewrite the sample like this:
---
marp: true
theme: default
paginate: true
---
# Quarterly Update
Dana Lee, 2026-09-11
---
## Revenue
- Up 12 percent on Q2
- Two new markets
<!-- Pause here for questions. -->
---
## Pipeline
| Region | Deals |
|---|---|
| EMEA | 14 |
| APAC | 9 |
Then convert:
marp --pptx deck.md
The Marp CLI README is explicit about what you get: the PPTX contains rendered slide pages as images, and the contents can't be modified or reused in PowerPoint. That's fine for presenting and poor for handing off. The --pptx-editable flag is marked experimental, needs LibreOffice Impress installed alongside the browser, produces lower-fidelity slides, and drops presenter notes. If editability is the requirement, use Pandoc.
Method 3: md2pptx in Python
md2pptx is a Python script built on python-pptx. Its README requires Python 3.11 or later (a rule in force since April 2026). Install python-pptx, clone the repo, and pipe your Markdown in:
pip3 install python-pptx
git clone https://github.com/MartinPacker/md2pptx.git
cd md2pptx
python3 md2pptx deck.pptx < deck.md
md2pptx splits on heading levels with fixed roles: # makes a title slide, ## makes a section page, and ### makes a bulleted content slide. Metadata lives in key: value lines at the top of the file before the first blank line, which is where you point it at a template with template: company.pptx. To convert the sample, demote each ## to ### and add a # title line.
The output is native, editable text, and it supports bullets, tables, code blocks, and images. It's the right pick when Pandoc's layout choices don't match your template and you'd rather script the layout in Python than restyle a reference doc.
How Do Tables, Images, and Code Convert to Slides?
Tables. Pandoc and md2pptx create native PowerPoint tables from pipe tables, so you can restyle rows after conversion. Marp renders the table into the slide image. Alignment colons in the divider row are honoured by Pandoc; our Markdown table guide covers that syntax.
Images.  inserts the image on all three tools. In Pandoc, an image following text switches the layout to Content with Caption, which places the picture beside the text rather than below it. Paths are relative to where you run the command. See the Markdown image post for sizing attributes.
Code blocks. Pandoc keeps fenced code as monospaced text. Marp syntax-highlights it in the rendered image. md2pptx places it as a monospaced block.
Horizontal rules. --- is a slide break in Pandoc and Marp. That means you can't use it as a visual divider inside a slide; our horizontal line guide lists the alternatives.
Common Markdown to PowerPoint mistakes
Every heading became its own slide, or none did. Pandoc guessed a slide level you didn't expect. Pass --slide-level=2 (or 1) explicitly and the structure becomes predictable.
The template's fonts didn't apply. --reference-doc only works when the template contains the seven named layouts. Rename the layouts in PowerPoint's Slide Master view to match, then reconvert.
Marp output can't be edited. That's the default behaviour, not a bug. Use Pandoc for an editable deck, or accept Marp's image slides and present from its PDF export instead.
Markdown to PowerPoint FAQ
Going from markdown to powerpoint is a solved problem once you pick the tool for the job. Use Pandoc for editable decks and corporate templates, Marp for designed slides you'll present as-is, and md2pptx when you want Python-level control over layout. Write the deck in the editor, keep headings consistent so the slide breaks land where you expect, and convert with one command. The same Markdown also converts to Word with our Markdown to DOCX tool.