← Back

Markdown to Word

Convert Markdown text into an editable Word document

Markdown content

Supports headings, paragraphs, bold, italic, lists, tables, code blocks, blockquotes and images (only data: URI images are embedded; other image URLs are kept as a text note and never downloaded). Everything runs locally in your browser, and your content is never uploaded.

About Markdown to Word

Markdown to Word turns the Markdown you type into the text box into an editable .docx document. It first parses your Markdown into HTML with the marked library, then converts headings, paragraphs, bold, italic, list items (including ordered and nested lists) and links into Word paragraphs one by one. It also supports tables (real Word tables), code blocks (monospaced text with grey shading), block quotes (indent plus a left border) and images (only data: URI images are embedded; other image URLs leave a text note). The notes and limits below were written by checking the tool's actual conversion logic.

How to use it

  1. Paste or type your Markdown into the 'Markdown content' box. The page opens with a sample already filled in, containing a heading, a line with bold text and two list items, so you can try it straight away.
  2. Make sure the box is not empty. The button is disabled while the box is blank or whitespace only.
  3. Click 'Convert and download Word'. The button shows 'Generating…' while working, and the browser then downloads a file named converted.docx.
  4. Open the file in Word or WPS and check or adjust the styling. If conversion fails, the page shows 'Conversion failed. Please check the Markdown content format and try again.'

Conversion rules and a concrete example

This is traced from the HTML that marked actually produces and the tool's conversion code. The pre-filled sample contains '# Heading', a line with '**bold**' text, and two list items starting with hyphens. marked produces three top-level blocks, h1, p and ul, with two li elements inside the ul. The Word document therefore has 4 paragraphs: one using the built-in Heading 1 style, one normal paragraph where the word 'bold' is in bold, and two bulleted paragraphs. In general, heading levels 1 to 6 (# to ######) become Word Heading 1 to Heading 6; bold (**text**) and italic (*text*) become bold and italic runs; each item of an unordered list becomes one bulleted paragraph; each item of an ordered list becomes a paragraph starting with '1. ', '2. ' and so on; and a nested sub-list is split into its own indented paragraphs. Tables, code blocks, quotes and images are covered in the limits below.

Limits and known behavior

  • The numbers of an ordered list (1. 2. 3.) are written into the paragraph text (for example '1. item'); they are not Word's automatic numbering, so after adding or removing items in Word you need to fix the numbers yourself.
  • Nested lists keep their hierarchy: each item of a sub-list becomes its own paragraph, indented by level (a deeper bullet level for unordered lists, an indent for ordered ones). Up to 9 levels are supported.
  • Heading levels 5 and 6 map to Word Heading 5 and Heading 6.
  • Tables become real Word tables: single-line borders, full page width, bold header cells (th), and the column alignment (left/center/right) from your Markdown. Inline formatting inside cells (bold, italic, inline code, links) works, but each cell holds a single paragraph; multiple paragraphs or nested lists inside a cell and merged cells are not supported.
  • Fenced code blocks (```) become one paragraph per line in Consolas 10 pt with light grey shading, blank lines included; there is no syntax highlighting and a language tag such as js changes nothing. Inline code uses the monospaced font without shading. If Consolas is not installed, Word substitutes another font.
  • Paragraphs in a block quote (>) are indented as a whole and get a grey left border; each extra nesting level indents one step further. Lists inside a quote keep the border, but bullet items are not indented further. A horizontal rule (---) still becomes an empty paragraph.
  • A link is written as 'link text (URL)'. The URL is kept as plain text, not a clickable hyperlink.
  • For images (![alt](url)), only base64 data: URI images in png/jpg/gif/bmp are embedded in the Word file, scaled down proportionally to at most 600 px wide. Any other URL (such as https://…) is never fetched; it becomes the italic text '[image: alt] (URL)'. A data: image that cannot be decoded, and svg, become '[image: alt]'.
  • Strikethrough markers (~~text~~) are removed, but the text is not shown struck through.
  • Headings use Word's built-in styles, so their look depends on the Word template on your computer. The tool sets no fonts, sizes or page size.
  • Only bold and italic are recognised as inline formatting; bold and italic can be combined on the same text.
  • The download name is always converted.docx, with no rename option.

Are the numbers in an ordered list Word's automatic numbering?

No. The numbers of an ordered list are written as text into each paragraph (such as '1. ' and '2. '), starting from the number used in your Markdown. This does not depend on Word's automatic numbering, so it displays reliably. If you reorder items in Word afterwards, change the numbers by hand, or select the paragraphs and switch to Word's Numbering button.

Why don't web images show up in the Word file?

So that the tool never makes network requests behind your back (and to avoid cross-origin download failures), it embeds only data: URI images. Images with https or other external URLs become text like '[image: description] (URL)'. If you need the picture, convert it to a data: URI before pasting, or insert it in Word by hand.

Can bold and italic sit inside headings or list items?

Yes. For each block the tool walks through the text nodes inside it, and whenever it meets bold or italic markup it applies bold or italic to that text. Headings already use Word's heading style, though, so the visible effect of bolding inside a heading depends on the style itself.

How is this different from pasting Markdown into Word?

Pasting gives you the raw text with its hash marks and asterisks. This tool parses the Markdown first, turning hash marks into heading styles and asterisks into bold or italic, so the document is closer to a formatted result. For complex documents (merged cells, multi-paragraph cells, syntax highlighting and so on) its coverage is limited, so review the result after converting.

Can it handle a long document?

Yes. The document is built in your browser, so speed depends on length and your device, and the code sets no limit. Longer input takes longer after you click, and the button is disabled in the meantime.

Privacy and processing

Parsing the Markdown and building the .docx both happen in your browser. The two libraries needed are loaded by the page when you click convert, and the code contains no request that sends your text to a server. The text exists only on the current page and is gone when you close or refresh it.