Markdown to Word (.docx)
Paste Markdown or drop a .md file, and download a Word document (.docx). The browser writes the file, so no text
and no image is uploaded.
Full page version: joellof.com/markdown-to-office/app/word/
Many people write in Markdown, or get Markdown from an AI tool, and must hand in a Word file. Pandoc does it well, but it is a command-line program. Most web converters upload the file, add a watermark, or lose the headings, the tables and the code blocks. This page gives a real Word document in one click.
What it does
Section titled “What it does”- Real Word styles. Headings use the Heading 1 to Heading 6 styles, so the navigation pane and a table of contents work.
- Lists, tables and links. Bullet and numbered lists are Word lists, with their levels. Tables are Word tables, and links are links. Task lists get a check box.
- Code. Code blocks use a monospace style with a light background. Inline code is monospace too.
- Quotes and rules. Block quotes get an indent and a line on the left.
- Images. Images are embedded in the document, fitted to the page width and never larger than their own size.
PNG, JPEG, GIF, WebP and SVG, up to 20 MB each. A
data:image works at once. For an image with a relative path, such as./img/plan.png, the page lists the images it needs: drop the files, their folder or a ZIP, and it matches them by path, then by file name. A web image (http or https) loads only when its server allows other sites to load it (CORS): the page has no proxy, so your images stay in your browser. A missing image becomes a box with its alt text, and the page lists each missing image with the reason.
How it works
Section titled “How it works”- marked splits the Markdown into tokens.
- The page turns the tokens into a list of blocks with styled runs: the same model draws the preview.
- The browser loads each image (from the text, the web or the dropped files), reads its size, and turns WebP and SVG into PNG on a canvas, because Word needs a PNG (an SVG goes in as SVG with the PNG as its fallback).
- The docx package writes each block as a Word paragraph or table, with the Heading, Code and Quote styles and the images, and the file downloads.
Tech Stack
Section titled “Tech Stack”| Language | TypeScript |
| UI | React |
| Platform | Browser |
| Key Deps | marked, docx |
| Build | Bun |
Related projects
Section titled “Related projects”- Markdown to PowerPoint: turn Markdown into a .pptx deck, one slide per heading.
- Markdown to PDF: turn Markdown into a PDF file.
- Paste from ChatGPT Cleaner: paste AI output and copy clean text for Word, email, Jira or Slack.