Markdown to PPTX: marp-cli, pandoc, python-pptx compared
Markdown becomes a PPTX file one of three ways: marp-cli renders each slide exactly as designed but as an image (marp deck.md --pptx), pandoc writes native, editable PowerPoint slides from plain Markdown headings (pandoc deck.md -o deck.pptx), and python-pptx builds slides programmatically from a script. Pick marp-cli for fidelity, pandoc for editability, python-pptx for generated decks.
This guide shows the command for each, what survives the conversion, and the trade-off that decides it. It is written for lecture decks, where the Markdown is the working format and PowerPoint is what a colleague or a learning platform asks for.
Which one?
| marp-cli | pandoc | python-pptx | |
|---|---|---|---|
| Input | Marp Markdown | plain Markdown | your code |
| Slide fidelity | exact (image per slide) | pandoc's layout | whatever you build |
| Editable in PowerPoint | no (experimental option: partly) | yes, native text | yes |
| Speaker notes | yes (default mode) | yes (::: notes) |
yes |
| Tables | as part of the image | native tables | native |
| Setup | Node + a browser | pandoc | Python |
1. marp-cli: exact slides, one image each
npm install -g @marp-team/marp-cli
marp deck.md --pptx # deck.pptx
marp deck.md --pptx --allow-local-files # if the deck uses local images
Each slide is rendered by a browser and placed in the PPTX as a picture, with the speaker notes carried into PowerPoint's notes pane. The result looks exactly like the preview, themes included, and cannot be edited as text in PowerPoint. That is the right trade for a finished lecture deck someone needs to play.
The experimental --pptx-editable flag converts to editable shapes instead; it needs LibreOffice Impress installed as well as the browser, drops presenter notes, and reproduces complex styling less faithfully. Use it when a colleague must edit the words, and check every slide.
2. pandoc: editable slides from headings
pandoc deck.md -o deck.pptx
pandoc deck.md -o deck.pptx --slide-level 2 --reference-doc template.pptx
pandoc makes a new slide at each heading of the slide level (level 1 headings become section slides when --slide-level 2 is set), fills it with the paragraphs, lists, images and tables under the heading, and writes native PowerPoint objects. Speaker notes are a fenced div:
## Round-robin
- quantum
- ready queue
::: notes
Ask about the lab timings before the next slide.
:::
Two columns are :::: {.columns} with ::: {.column} children. The look comes from the reference document: export a PPTX from the department's template, pass it with --reference-doc, and the layouts and fonts are the template's. A Marp deck goes through pandoc better than you might expect: the --- separators start new slides (pandoc treats a horizontal rule as a slide break), the YAML front matter is read as metadata and its Marp keys ignored, and the directive comments are dropped. What is lost is everything Marp-specific: the theme, bg images, the w: sizes, columns built with divs. So pandoc is the choice when the deck is written for pandoc or when editable text matters more than the look.
3. python-pptx: generated decks
from pptx import Presentation
prs = Presentation("template.pptx")
for title, bullets in slides:
s = prs.slides.add_slide(prs.slide_layouts[1])
s.shapes.title.text = title
s.placeholders[1].text = "\n".join(bullets)
prs.save("deck.pptx")
python-pptx is a library, not a converter: you parse the Markdown yourself (or start from structured data) and place text, images and tables into layouts. It fits decks that are generated per course or per week from a database or a script, and it is the only option that gives full control over the output. It is the most work for a single deck.
"Online converter" and "AI converter"
The searches exist, and the tools exist. Two checks before uploading a deck: where the file goes, and what the output actually is (native slides or images). For a deck with unpublished material, run the conversion locally with one of the three above; all three work offline.
For a lecture deck
Keep the Markdown as the master. Convert to PPTX only for the person or platform that asks, and never edit the PPTX; edit the Markdown and convert again. With marp-cli that is one command in the week's folder, and the PDF for students comes from the same file with --pdf. Lecture Studio keeps decks as Marp Markdown for exactly this reason and leaves the conversion to marp-cli; it does not export PPTX itself. The app runs on macOS 15 or later and needs an Oberik project key for the assistant.
FAQ
How do I convert Markdown to PowerPoint?
marp deck.md --pptx for a Marp deck (exact slides as images, notes kept), or pandoc deck.md -o deck.pptx for plain Markdown (editable native slides, one per heading).
Is the PPTX from Marp editable?
Not by default: each slide is an image with the notes in the notes pane. --pptx-editable is experimental, needs LibreOffice, and drops the notes.
Does pandoc keep speaker notes and tables?
Yes. Notes go in a ::: notes block under the slide's content; Markdown tables become native PowerPoint tables.
Can I convert Markdown to PPTX with Python?
Yes, with python-pptx: parse the Markdown yourself and add slides from a template's layouts. It is the most flexible route and the most code.