Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>Word to Markdown - w2mNew to Visual Studio Code? Get it now.
Word to Markdown - w2m

Word to Markdown - w2m

mde-tools

|
2 installs
| (0) | Free
Convert Word (.docx) files to Markdown, split by chapter or as a single file. Pure VS Code extension: no Word and no other install needed.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Word to Markdown - w2m

Turn a Word (.docx) file into Markdown. Right-click the file, choose Split Files or Single File, and w2m writes clean Markdown that keeps the chapters, lists, tables, images, and code blocks of the original. No Word and no other software to install.

English | Japanese

What makes w2m different

  • Two output styles, one click — One Markdown file per chapter, or a single file that keeps the heading hierarchy of the Word document.
  • Chapters come from Word's own numbering — Chapter numbers are read from Word's numbering or from the heading text (3, 4.1). A heading that holds only a number takes the next paragraph as its title.
  • Annotated screenshots stay annotated — Arrows, highlight frames, and text boxes drawn over a picture are merged into the PNG, so the callouts are not lost.
  • Tables keep their content — Merged cells expand, line breaks inside a cell become <br/>, and pictures in cells are saved as image files.
  • Code blocks from bordered paragraphs — Consecutive paragraphs with a paragraph border become a fenced code block.
  • Runs on your machine — The document is converted locally inside VS Code. Nothing is uploaded.

Usage

  1. In the Explorer, right-click a .docx file.
  2. Choose Split Files or Single File.

You can also run w2m: Split Files or w2m: Single File from the Command Palette (Ctrl+Shift+P).

The result is written next to the .docx, in a folder named <file name>.docx_yyyyMMdd_HHmmss. When the conversion ends, you can open the Markdown preview or reveal the folder.

Output styles

For a Word document with this outline:

1 Introduction
  1.1 Background
2 Procedure
  Notes

Split Files writes one file per numbered heading:

0 トップ.md           (content before the first chapter)
1 Introduction.md
1.1 Background.md
2 Procedure.md        (contains "## Notes")
images/

Single File writes one file that keeps the hierarchy:

<file name>.md
  # 1 Introduction
  ## 1.1 Background
  # 2 Procedure
  ## Notes
images/

Images are saved in the images folder (<chapter number>_image_0000.png, …) and linked with relative paths.

What is converted

Word Markdown
Headings with numbering or outline levels # to ######, with chapter numbers
Bulleted lists -
Numbered lists 1.
Tables Markdown tables (merged cells expand, cell line breaks become <br/>)
Pictures, including pictures in table cells Image files in images/
Arrows, frames, and text boxes over a picture Merged into one PNG
Paragraphs with a paragraph border Fenced code blocks
SEQ figure and table numbers Numbers with their separator (Figure 1-2)

Settings

Setting Default Description
w2m.outputImage true Write images to the images folder.
w2m.outputListNumber true Use 1. for numbered lists. When off, every list uses -.
w2m.ignoreTab true Drop tab characters. When off, a tab becomes 4 spaces.

Good to know

  • Shapes are drawn with the Chromium built into VS Code. While a document with shapes is converted, a tab named "w2m 図形合成" opens beside the editor and closes when the conversion ends. Text in shapes is measured with your system fonts.
  • Supported shapes: rectangles, rounded rectangles (drawn as rectangles), ellipses, and connector lines with arrowheads.
  • Markdown files are written as UTF-8 with a byte order mark.
  • The format is .docx. The old .doc format is not supported.

License

MIT. See LICENSE.txt and THIRD-PARTY-NOTICES.txt.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft