Markdown to Word
Not an HTML file with a .doc extension. A real Office Open XML document, styled so your template can take it over.
A real .docx, not an .html file with the wrong extension
There is a trick a lot of converters play: write an HTML file, name it document.doc, and let Word open it. Word does open it, and then every version of Word warns the person you sent it to that the file is not what it claims to be, styles do not appear in the styles gallery, and track changes behaves oddly.
This produces the real thing. A .docx is a ZIP containing OOXML parts, and that is what gets built here: a document part, a styles part, a numbering part, relationship parts and the document properties. Word, LibreOffice Writer, Google Docs and Pages all open it as a native document.
How your Markdown maps onto Word
Headings become the built-in Heading 1 to Heading 6 styles, which is the detail that matters most — because it means Word's navigation pane works, a table of contents can be generated from References ▸ Table of Contents, and your organisation's template can restyle the whole document by redefining those styles.
Bullet and numbered lists become real Word lists with a numbering definition behind them, nine levels deep, so nesting survives and the numbers renumber themselves when you edit. Tables become Word tables with a shaded header row that repeats if the table breaks across pages, and column alignment from the Markdown separator row is carried over. Fenced code blocks become a monospaced paragraph on a tinted background. Blockquotes get an indent and a coloured left border. Links become genuine hyperlinks with the Hyperlink character style. Inline bold, italic, inline code and strikethrough all survive.
Task list checkboxes come across as [ ] and [x] text rather than Word's content-control checkboxes, because those carry a lot of baggage and do not round-trip between Word and everything else.
Styles, so your template can take over
The styles part defines Normal, Title, Heading 1 to 6, List Paragraph, a code style, a quote style and a hyperlink style — with a document default of Calibri or Times New Roman at the size you pick. Because these are the standard style IDs rather than direct formatting, dropping the text into a corporate template works the way it should: the template's Heading 1 wins, and the document takes on its look without you reformatting a single paragraph.
That is also the argument for converting rather than pasting. Paste Markdown-rendered HTML into Word and you get a pile of direct formatting that fights the template forever. Convert it, and you get styled paragraphs the template can address.
What it will not do
Images are not embedded — they appear as their alt text in square brackets, because a page running in your browser cannot read a local file path and fetching a remote URL would mean sending a request on your behalf. There are no headers, footers or page numbers; Word adds those in two clicks from the Insert tab and doing it there means they follow your template. Footnotes, comments and tracked changes have no Markdown equivalent to convert from.
The ZIP is written with its entries stored rather than compressed, which keeps the writer small and dependency-free at the cost of a slightly larger file. Word does not care, and a text document that lands at 25 KB instead of 9 KB is not a problem worth a compression library.
Common questions
Will Word complain when I open it?
It should not. The file is a proper OOXML package with the parts and relationships Word expects, not an HTML file renamed to .doc. If Word ever does complain about a specific document, tell us what was in it — that is a bug worth fixing.
Do headings show up in the navigation pane?
Yes, because they use Word's built-in Heading 1 to Heading 6 styles rather than bold text at a larger size. The same thing makes References ▸ Table of Contents work straight away.
Can I apply my company template afterwards?
That is the main reason to convert rather than paste. Everything is styled with standard style IDs, so attaching a template or copying the text into one lets the template's definitions take over without any reformatting.
What happens to images?
They become their alt text in square brackets. The browser cannot open a local file path, and fetching remote URLs would break the promise that nothing leaves your machine. Add the pictures in Word afterwards.
Does it work in Google Docs and LibreOffice?
Yes. Both read .docx natively. Google Docs maps the heading styles onto its own, so the document outline works there too.
Why is the file bigger than I expected?
The ZIP entries are stored uncompressed. Writing a compressor would mean pulling in a library for the sake of a few kilobytes on a text document, so we did not. A long report still comes in well under a megabyte.
Is my text uploaded?
No. The Markdown parser and the .docx writer both run in this page. Turn off your network after the page loads and conversion carries on working.