About DOCX To Markdown Converter
Drop one or more Word documents and get Markdown you can put in a repository, a wiki or a static site, or a tidy HTML page without Word’s styling. Headings, bold and italic, nested lists, links, tables and strikethrough all come across.
Pictures are taken out of the document as image files in a folder named after it, and the Markdown links to them by relative path, so the document and its pictures work together once you unzip the download.
How it works
- The mammoth library reads the document’s structure rather than its looks: a paragraph in the Heading 2 style becomes a level-two heading, Word’s numbered and bulleted lists become lists, and the Title style becomes the top heading.
- Each picture is copied out byte for byte, in the format it was stored in, and named image-1, image-2 and so on in order of appearance. Its alternative text from Word becomes the image description.
- The HTML is cleaned with DOMPurify, then written as Markdown by the Turndown library, or as a complete HTML page with a light, readable style.
Questions
What is lost in the conversion?
Anything that is appearance rather than structure: fonts, colours, sizes, page layout, headers and footers, text boxes and comments. Text formatted to look like a heading without using a heading style comes out as an ordinary paragraph, so apply Word’s heading styles first if you can.
Can it convert an old .doc file?
No. Only .docx files can be read. Open a .doc file in Word or LibreOffice and save it as .docx first. Password-protected documents must also be saved without the password.
Why are some pictures .emf or .wmf files?
Word stores charts and drawings in those Windows formats, and the tool saves every picture exactly as it was stored rather than converting it. Most Markdown viewers cannot show them; export the chart from Word as PNG if you need it to display.
Are my documents uploaded?
No. Each file is read and converted in your browser, and the results are made in memory for you to download. Documents up to 50 MB each are accepted.
Everything you enter here is processed in this browser tab. Nothing is uploaded, logged or shared. How privacy works here.