Transform Markdown into production-ready documents — entirely in your browser.
No server. No uploads. No friction.
v2.5 introduces direct Markdown → PDF conversion. No intermediate tools, no server round-trips — your PDF is generated entirely client-side in milliseconds.
The new output format switcher lets you choose between DOCX and PDF before converting:
| Feature | DOCX | |
|---|---|---|
| Output format | .docx |
.pdf (universal) |
| Template styles | ✓ 4 presets | — (branded layout) |
| Page numbers | ✓ | ✓ |
| Page breaks on H1 | ✓ | ✓ |
| Headings H1–H6 | ✓ | ✓ with size scaling |
| Bold / Italic / Strikethrough | ✓ | ✓ |
| Inline code | ✓ | ✓ Courier font |
| Fenced code blocks | ✓ | ✓ with accent bar |
| Blockquotes | ✓ | ✓ with gold left bar |
| Tables | ✓ | ✓ with cell wrapping |
| Bullet & ordered lists | ✓ | ✓ |
| KaTeX math | ✓ OMML | placeholder |
| Hyperlinks | ✓ | ✓ underlined |
| Privacy | 100% local | 100% local |
- Branded page header — every page carries the MD2DOCX wordmark and generation date
- Gold accent system — H1 underlines, code block left bars, and bullet dots use the signature gold colour
- Smart cell wrapping — table cells word-wrap within their column; row height adjusts automatically
- Page numbers — centred footer with
current / totalformat on every page
v2.5.1 resolves DOCX file corruption errors in Microsoft Word.
Previously, the generated DOCX files were missing specific XML namespaces (w14, w15) and extended properties (app.xml) required by modern versions of Microsoft Word (2010, 2013, Office 365).
- 100% Native MS Word Support — The DOCX generation engine has been updated to strictly adhere to the
officeDocumentschema, ensuring files open flawlessly in Microsoft Word without triggering the "file is corrupt and cannot be opened" or "recovery" prompts.
- Dual Output Formats — Export to
.docx(Microsoft Word) or.pdfwith one click - Full Markdown Parsing — Headings H1–H6, bold, italic, strikethrough, inline code, links
- Code Blocks — Fenced blocks with monospace rendering and language label support
- Tables — Full GFM table support with header styling and alternating row shading
- Lists — Bullet and ordered lists with up to 5 nesting levels
- Blockquotes — Rendered with a styled left-border accent
- Math Equations — LaTeX rendering via KaTeX (DOCX: full OMML; PDF: placeholder)
- Horizontal Rules — Rendered as a styled divider
- 4 Style Templates — Academic, Technical, Corporate, Legal
- Page Breaks — Auto-insert page breaks before every H1
- Code Formatting Toggle — Enable/disable monospace code block styling
- Blockquote Toggle — Enable/disable blockquote styling
- Custom Filename — Set the output filename before downloading
- Drag & Drop — Drop
.mdor.txtfiles directly onto the upload zone - Markdown Editor — Built-in textarea editor with live character/word/section metrics
- System Log — Real-time conversion log with progress bar
- Dark Theme — Precision dark UI with gold accents and noise texture
- Zero Dependencies — One HTML file; all libraries loaded from CDN
# Clone the repository
git clone https://github.com/SilverCipherr/MD-to-DOCX.git
cd MD-to-DOCX
# Open in your browser — no build step needed
open index.html # macOS
xdg-open index.html # Linux
start index.html # Windows# Python
python -m http.server 8000
# Node.js
npx serve .
# PHP
php -S localhost:8000Then visit http://localhost:8000
- Load Markdown — Drag & drop a
.mdfile or type/paste directly in the editor - Configure — Set template style, toggles, and output filename in the Parameters panel
- Select DOCX — The DOCX tab is active by default
- Convert — Click Convert to DOCX (or press
Ctrl + Enter) - Download — Click ↓ Download DOCX when it appears
- Load Markdown — Same as above
- Select PDF — Click the PDF tab in the Output Format switcher
- Convert — Click Convert to PDF
- Download — Click ↓ Download PDF when it appears
The PDF tab shares the same page-break and code/blockquote toggles from the Parameters panel.
| Shortcut | Action |
|---|---|
Ctrl + Enter |
Convert (active format) |
| Category | Technology |
|---|---|
| Core | Vanilla JavaScript (ES6+) |
| DOCX Generation | Custom pure-JS engine + JSZip |
| PDF Generation | jsPDF 2.5 |
| Math Rendering | KaTeX + mathml2omml |
| Fonts | Syne, Space Mono (Google Fonts) |
| Hosting | Vercel |
MD-to-DOCX/
├── index.html # Complete application (self-contained)
├── favicon.png # App icon
├── README.md # This file
└── LICENSE # MIT License
| Option | Applies To | Default | Description |
|---|---|---|---|
| Automatic Page Breaks | DOCX + PDF | Off | Insert page break before every H1 |
| Preserve Code Formatting | DOCX + PDF | On | Render fenced code blocks with monospace font |
| Render Blockquotes | DOCX + PDF | On | Style > quoted text with a left-border accent |
| Output Template | DOCX only | Academic | Visual theme for the Word document |
| Output Filename | DOCX + PDF | document |
Base name for the downloaded file |
- Privacy first — No data ever leaves your browser
- Zero friction — One file, no install, no login
- Precision — Conversion that faithfully respects Markdown semantics
- Speed — Instant in-browser generation; no server round-trip
- Aesthetics — A tool you enjoy using, not just tolerate
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch (
git checkout -b feature/your-feature) - Commit your changes (
git commit -m 'Add your feature') - Push to the branch (
git push origin feature/your-feature) - Open a Pull Request
MIT — see LICENSE for details.
- jsPDF — Client-side PDF generation
- JSZip — ZIP/DOCX packaging
- KaTeX — Fast LaTeX math typesetting
- mathml2omml — MathML → OOXML math conversion
- Google Fonts — Syne & Space Mono typography
Made with precision for those who care about their documents.
— Prottay