Updated
How to Convert Word (DOCX) and PowerPoint to Markdown
1. One file with pandoc
pandoc input.docx -t gfm -o output.md --extract-media=media-t gfm gives GitHub-flavoured Markdown with pipe tables; --extract-media saves the embedded images and links them. Check the result once: Word styles that are not real headings (bold text at a larger size) come out as plain paragraphs.
2. What breaks
- Merged or nested table cells: no Markdown equivalent; the table may be flattened or kept as HTML.
- Text boxes, headers and footers: often dropped or moved.
- Tracked changes and comments: accept or reject them before converting.
- Headings made by hand: use real heading styles in the source if you control it.
3. Preparing the result for AI
Keep the heading hierarchy, split the Markdown into chunks along headings, and store the file name and conversion date with each chunk. Tables are easier for a model to use as JSON rows than as long pipe tables. See also PDF to Markdown for LLMs and HTML to Markdown.
4. Many files
Plainprobe Document to Markdown converts DOCX, PPTX, PDF, HTML and scanned images from URLs to Markdown and JSON, with tables as JSON and optional RAG chunks, at $0.004 per document; failed documents are free.
Limits to keep in mind
- Password-protected files cannot be converted.
- Charts and SmartArt are images or drawings, not text.
- Convert only documents you are allowed to process.
FAQ
How do I convert a Word document to Markdown?
With pandoc: pandoc input.docx -t gfm -o output.md --extract-media=media converts headings, lists, bold text, tables and images to GitHub-flavoured Markdown. For many files, run it in a loop or use a bulk converter.
Do tables survive the conversion?
Simple tables do. Merged cells and nested tables have no Markdown equivalent; a converter that also returns tables as JSON keeps them usable.
Why convert Word files to Markdown for AI?
Markdown keeps the structure (headings, lists, tables) in few tokens, so chunking and retrieval work better than with plain text or raw XML.
What about PowerPoint files?
A PPTX converts slide by slide: titles become headings and text boxes become paragraphs or lists. Speaker notes and images need explicit handling.