Skip to content

alspeirs/md2word

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

md2word

Convert Markdown files to Word (.docx) documents — available as both a command-line tool and a web app.

🌐 Live web app: alspeirs.github.io/md2word

🔧 Architecture diagram: alspeirs.github.io/md2word/diagram.html

By Alistair Speirs · MIT License


Web App

A drag-and-drop web interface. Drop a .md file, get a .docx download instantly. Runs entirely in the browser — nothing is uploaded anywhere.

Run locally

Requires Caddy:

cd web
caddy run --config Caddyfile

Then open: http://localhost:8081


CLI

A command-line tool. Convert any Markdown file to Word from your terminal.

Install

Requires Node.js v18+.

cd cli
npm install
npm install -g .

Usage

md2word <input.md> [output.docx]

If output.docx is omitted, defaults to the same name as the input with a .docx extension.

Examples

md2word README.md
md2word notes.md report.docx
md2word ~/Documents/draft.md ~/Desktop/draft.docx

Supported Markdown

  • Headings H1–H6
  • Paragraphs
  • Bold, italic, strikethrough, inline code
  • Ordered and unordered lists (nested)
  • Blockquotes
  • Fenced code blocks
  • Tables
  • Horizontal rules
  • Line breaks

Dependencies

  • marked — Markdown parser
  • docx — Word document generator

License

MIT

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors