Markdown to Docx Converter
Convert Markdown (.md) files to Microsoft Word (.docx) using Pandoc, with an optional interactive file picker and batch CLI.
Features
- CLI and interactive UI — convert paths directly or pick files with the terminal menu
- Batch conversion — multiple inputs; optional
--output-dir - Asset paths — resolves images relative to each Markdown file
- Automation-friendly —
--force,--skip-existing,--rename-on-exists, exit codes - GitHub Markdown —
--from gfmfor GitHub-flavored input - Word styling —
--reference-doc, bundled template (--reference-doc bundled),--toc - Local venv —
./convert.pyre-execs intovenv/bin/pythonwhen present
See docs/LIMITATIONS.md for Pandoc/Word caveats.
Requirements
- Python 3.9+
- Pandoc (system install) or
pypandoc_binaryvia optional extra
Installation
From PyPI:
pip install "pandoc-md-to-docx[binary]"
From a clone:
python3 -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
pip install -e ".[dev]"
pre-commit install # optional
Usage
Command line
md-to-docx notes.md
md-to-docx notes.md -o report.docx --force
md-to-docx README.md --from gfm --reference-doc bundled
md-to-docx chapter1.md chapter2.md -d ./output --skip-existing
md-to-docx long-doc.md --toc --toc-depth 3 --reference-doc my-template.docx
Interactive mode
md-to-docx
md-to-docx -r # include .md files in subdirectories
Use Space to multi-select, Enter to convert, Esc to cancel.
From a clone (without activating venv)
./convert.py input.md --force
python -m md_to_docx input.md --force
Development
pip install -e ".[dev]"
ruff check src tests && ruff format --check src tests
pytest
CI runs lint, then Linux and Windows tests (Python 3.12). If GitHub reports a runner
internal server error or job was not acquired, re-run the workflow from the
Actions tab or use Run workflow (workflow_dispatch); that is usually infrastructure,
not a failing test.
Release process: docs/PUBLISHING.md. History: CHANGELOG.md.
License
MIT — see LICENSE.
Metadata
Release files for pandoc-md-to-docx 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pandoc_md_to_docx-0.2.1.tar.gz | 21.9 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pandoc_md_to_docx-0.2.1-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 41.4 kB
Release files / pandoc_md_to_docx-0.2.1.tar.gz
| Download URL | pandoc_md_to_docx-0.2.1.tar.gz |
|---|---|
| Size | 21.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f47584a78a217f9ce61e4d246266b187dd7d3ca8451594d0dc453e03844d095c
|
|
BLAKE2b-256 checksum How to use checksums |
fd1a51cc857ca0c7dafaf10efe5a1bc5d1ec6cf2e47778b3d7f96aadc9e0e104
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Release files / pandoc_md_to_docx-0.2.1-py3-none-any.whl
| Download URL | pandoc_md_to_docx-0.2.1-py3-none-any.whl |
|---|---|
| Size | 19.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
aed1e58617024cce29a8fd9cb9b72fa2e624d7be40a890224eac42257b7c70c1
|
|
BLAKE2b-256 checksum How to use checksums |
dd950654be96bf8a10b712ae312dbfdd059bf2c0e2c457ebd80f0ec328b29e30
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.7
|
Security for pandoc-md-to-docx 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.