How to convert a Word document into Markdown
Converting a Word document into Markdown is easier than it seems. With a few commands, you will easily convert a document into a format that is plaintext and compatible with many things. Successfully following this tutorial will result in a formatted Markdown file.
Tools needed
- Pandoc
- Formatted Word document
- Command Line Program
- This program can be the default command line, Powershell, or Windows Terminal.
- File Explorer
- Text editor of your choice
Steps
- Open File Explorer to the directory where your Word document is saved.
- Optional: Move the Word document into a new, empty folder.
- Type in the following command into the file path depending on the command line program you chose:
cmd
wt
powershell
Figure 1: The file explorer in the current directory of the Word document with wt
being entered into its path. </figure> -
Type the following into the command line program, replacing the
<>
’s:pandoc -s <Word file name>.docx -t markdown --extract-media=images -o <Markdown filename>.md
- Check the directory where you ran the command, there should be a Markdown file created and an images folder if images were in your Word document.
- Open the newly created Markdown file in your text editor.
- Clean up the text, following the Markdown Guidelines
- Save your edited document.