Convert a Microsoft Word document to markdown

Photo by Paolo Syiaco on Unsplash

How to convert a Microsoft Word document like .doc or .docx to markdown.

# first install pandoc (use brew for macOS)
brew install pandoc

# then this is the command to convert the file
# the markdown type converts tables and the extract media will put all images in ./media
pandoc -f docx -t markdown my-document.docx -o my-markdown.md --extract-media=./

That's it. Short one. Hope it helps!

Hey! Are you a developer?

🚀 Set Up Your Dev Environment in Minutes, Not Hours!

Tired of spending hours setting up a new development machine? I used to be, too—until I automated the entire process!

Now, I just run a single script, grab a coffee, and let my setup take care of itself.

Save 30+ hours configuring a new Mac or Windows (WSL) development environment.
Ensure consistency across all your machines.
Eliminate tedious setup and get coding faster!
Get Instant Access →