Markdown to PowerPoint
Operator: Abdulla Al Fahad. How tools are built and checked
Many talks start life as notes in a text editor. Markdown is quick to write and easy to keep in version control, but a venue or a colleague still wants a .pptx. This tool turns a Markdown document into a PowerPoint file: a line of --- starts a new slide, headings become slide titles, and lists, code, tables, pictures and speaker notes are placed for you.
It differs from Markdown to PDF and Markdown to Word on this site in that the output is a deck with one idea per slide and editable text boxes, not a flowing document, and from PDF to PowerPoint, which pastes each page in as a picture. Here the slides are made of real text, so you can change them in PowerPoint afterwards.
Key features
- --- slide breaks, plus optional breaks at # or ## headings
- Title slides, nested bullets, numbered lists, tables, code blocks and quotes
- Pictures matched by file name from files you add; unmatched ones are listed
- Speaker notes from Notes: lines or notes comments, shown under the preview
- Light, Dark and Accent themes in 16:9 or 4:3
- Live preview that uses the same layout as the file; long slides continue as (cont.)
Slide-break rules, speaker-note syntax and how long slides are fitted
Slides are cut at lines that contain only three or more hyphens, outside code fences. Optionally a new slide also starts at each # heading, or at each # and ## heading, so a long outline becomes a deck without any --- lines. A first-level heading followed by at most one paragraph becomes a title slide with a large title and a muted subtitle. Other slides take a heading of level 1 to 3 as the title, drawn on a band in the Accent theme or with a short rule under it in the others.
Inside a slide the tool reads paragraphs, bullet and numbered lists up to four levels deep, fenced code blocks, tables of up to eight columns, block quotes and images. Bold, italic, inline code and links in text keep their style; links become real hyperlinks when they start with http, https or mailto. An image gets the picture matching its file name from the files you add (names are compared in lower case, without the folder). A slide with text and exactly one picture puts the picture in a right-hand column.
Speaker notes are written on a line that begins with Notes: or Note:, and everything from there to the end of that slide is the note; an HTML comment that begins with notes: also works. Notes go to PowerPoint's notes pane and are shown under the preview. A leading block between two --- lines made only of key: value lines is treated as front matter, not as a slide; its title: line, or failing that the first heading, names the file.
Slide size is 16:9 (13.33 by 7.5 inches) or 4:3 (10 by 7.5). Themes are Light, Dark and Accent. Body text starts at 22 points and titles at 32. Heights are estimated from character counts (an average glyph is half the font size wide, 0.6 in code), and a slide that would overflow is tried at 88, 78 and 70 percent of the text size before it is split onto a continuation slide whose title ends in '(cont.)'. The limits are 400,000 characters, 200 slides, 40 pictures of up to 10 MB each (scaled to 1,600 pixels on the long side) and a warning for a single block taller than a slide.
How it works
The text is split into slide chunks, with notes lifted out first, and each chunk goes through the marked lexer. The tokens become a small block model. A layout pass gives every block a position and size in inches on the chosen slide size, choosing the largest text scale that fits.
The preview draws that layout in HTML and CSS, and the file is written from the same layout with pptxgenjs, so what you see is what PowerPoint opens, apart from font differences. Because fitting works from estimated text widths, PowerPoint's own wrapping can differ by a line, so give long slides a glance.
Common use cases
- Turning conference-talk notes written in a code editor into a deck for the organiser
- Building a lecture deck from a course outline with # headings splitting the slides
- Giving a pull-request walkthrough with code blocks and a table of results
- Producing a quick status deck from a weekly Markdown report
- Handing a teammate who uses PowerPoint a deck from a README
How to use this tool
- Paste or type Markdown, or open a .md file; the sample deck shows the syntax.
- Put --- on its own line between slides, and Notes: under a slide for speaker notes.
- Add any pictures the Markdown refers to with Add images.
- Choose a theme, a slide shape and whether headings also start slides.
- Page through the preview and read the warnings.
- Press Download .pptx.
Example
A small deck with a title slide, a bullet slide with nested items and notes, and a table
# Q3 review
Growth and churn
---
## Highlights
- Revenue up **18%**
- Annual plans: 1.2% churn
Notes: mention onboarding emails
---
## Results
| Region | Q3 |
| --- | --- |
| Europe | 270 |What the file contains
Slide 1 title slide 'Q3 review' with subtitle 'Growth and churn'
Slide 2 title 'Highlights', two bullet levels, bold 18%, notes 'mention onboarding emails'
Slide 3 title 'Results', native PowerPoint table with a header row
Three slides, 16:9Tips for best results
- Use the 'start a slide at each # heading' option for an outline that has no --- lines at all.
- Keep bullet lists to about six items; a longer list is shrunk to 70 percent and then split, and nobody reads a 70 percent slide.
- Put the notes under each slide in a Notes: block rather than inline comments, so they are easy to find when you edit.
- Name your pictures in lower case, such as chart-q3.png, so that links in the Markdown match without thinking about case.
Edge cases to watch
Colours, fonts and layouts come from the three built-in themes; there is no custom template or master slide.
Nested lists stop at four levels and tables at eight columns; deeper structure is flattened or cut.
Text height is estimated, so PowerPoint may wrap a line differently from the preview.
Pictures are scaled to 1,600 pixels on the long side, so a very large image is smaller in the file than on disk.
HTML tags in Markdown are not rendered; only the notes comment is understood.
Common errors and how to fix them
- Image "x.png" was not found
- Add the file with Add images. The name in the Markdown is matched against the file name, ignoring case and the folder.
- Image is a web address, which this tool does not fetch
- Download the picture and add it as a file; the tool never reads from other websites.
- "This Markdown makes N slides; the limit is 200"
- Split the deck into two, or remove --- lines so that related content shares a slide.
- One block is taller than a slide
- A very long code block or table cannot be split. Break it into two blocks with a --- between them.
Best practices
- Write one idea per slide, and let the --- lines mark them rather than relying on automatic splitting.
- Open the file in PowerPoint and set fonts once if your organisation has a house font.
How a long slide is fitted
The tool first tries the slide at full size, then at 88, 78 and 70 percent of the text size. If it still does not fit, it fills the slide with as many blocks as will fit at 78 percent and moves the rest to a continuation slide with the same title and '(cont.)' added. A list is split between items, never inside one. A single block taller than the slide is placed anyway and reported, because splitting a code block or table in the middle would be worse than a cramped slide.
Frequently asked questions
Is the text editable in PowerPoint?
Yes. Titles, bullets and tables are real PowerPoint text and tables, and code blocks are text in a monospace font on a shaded box. Only pictures are images.
Can I use my own template?
No. The deck is written with one of three built-in themes. Open it in PowerPoint and apply a template there if you need one.