Browser-based document converter · DOCX to Markdown

Word to Markdown Converter

Writes GitHub-flavoured Markdown from a .docx: headings, emphasis, nested lists, pipe tables and links.

Input

Word files (.docx), up to 25MB

Drop your DOCX file here or click to choose

.docx

Files are read and converted on your device. Nothing is uploaded, and the result is yours to download or open in the Word editor.

Result

Markdown file, ready to download or edit

Choose a file to see the Markdown result here.

Word to Markdown Converter

Operator: Abdulla Al Fahad. How tools are built and checked

Documentation, wikis, GitHub repositories and most static site generators want Markdown, while the people writing policies, specs and release notes usually work in Word. Copying and pasting between the two loses the structure: headings turn into bold lines, tables fall apart and lists become dashes without nesting. The Word to Markdown Converter reads the .docx structure and writes GitHub-flavoured Markdown with real headings, lists, tables and links.

Markdown carries less than Word does, and the conversion is honest about it. Headings, emphasis, strikethrough, code, links, lists and tables all have a Markdown form and are written out. Underline, colours, highlights, fonts and alignment have none and are dropped, so a document whose meaning depends on red text or a highlighted clause should be reworded before converting. The output appears in the preview with a Copy button, and the .md download is the same text.

Key features

  • Writes GitHub-flavoured Markdown with # headings, emphasis, strikethrough, inline code, fenced code blocks and > quotes.
  • Indents nested lists by the parent marker's width so CommonMark renderers nest them correctly.
  • Produces pipe tables with a header row, escaped pipes and <br> for line breaks inside cells.
  • Escapes Markdown control characters in ordinary text and merges neighbouring runs so bold text never produces broken ** pairs.
  • Shows the Markdown in a preview with a Copy button alongside the .md download.

What Word formatting becomes in Markdown

Word heading styles become # lines: Heading 1 and Title become #, Heading 2 and Subtitle become ##, and Heading 3 and deeper become ###. Bold text is wrapped in **, italic in *, both in ***, strikethrough in ~~, and text in Word's Code or HTML Preformatted style becomes `inline code`, or a fenced code block when it spans several lines. Hyperlinks become [text](url) with http, https and mailto addresses. Paragraphs in Word's Quote or Intense Quote style become > block quotes.

Bulleted lists use - and numbered lists use 1., 2., 3.; nested items are indented under the parent marker by its width (two spaces under a bullet, three under 1.), which is what CommonMark requires. Numbers restart at 1 for every list. Tables become pipe tables: the first row is the header when Word marks it as a repeating header row (Layout, Repeat Header Rows); otherwise an empty header row is written so the table still renders. Header cells are written without ** marks, since Markdown renders them bold anyway. Pipe characters inside cells are escaped and line breaks inside cells become <br>. A line break inside a paragraph is written as a backslash at the end of the line.

Images are counted and reported but not written, and no ![alt](image.png) placeholder is created. Footnotes and endnotes appear as a numbered list at the end, which is how the Word reader presents them. Characters that Markdown would otherwise interpret, such as asterisks, underscores, backticks, square brackets and a number followed by a full stop at the start of a line, are escaped with a backslash so the text renders exactly as written.

How it works

After mammoth has produced the document structure, a serialiser walks the blocks and writes Markdown one block at a time. Neighbouring runs with the same formatting are merged first, and spaces at the edges of a bold or italic run are moved outside the markers, because **bold ** with a trailing space inside would not render.

List numbering and indentation are tracked per level as the blocks are written, table rows are emitted with the header row and the --- separator first, and the finished text is offered as a preview, a clipboard copy and a UTF-8 .md download.

Common use cases

  • A technical writer moves a product specification from Word into the docs folder of a GitHub repository.
  • A team migrates HR policies from Word to a Markdown-based wiki.
  • A developer receives API notes from a partner as .docx and needs them in Markdown for a README.
  • A blogger drafts posts in Word and publishes with a static site generator that expects .md files.
  • A researcher converts a Word draft to Markdown to keep it under version control alongside code.

How to use this tool

  1. Drop a .docx file on the upload area. The Markdown appears in the preview at once.
  2. If a table starts with an empty header row, turn on Repeat Header Rows for its first row in Word and convert again.
  3. Scan for backslashes before asterisks, underscores or numbers; they are escapes and will render as the plain characters.
  4. Copy the Markdown or download the .md file. Use Edit in Word editor if a heading level or list needs fixing before you convert again.

Example

Word document

Heading 1: Release 2.4
Normal: This release adds **export** support.
Bullets: Faster sync
         Fixed login bug (nested: Safari only)
Table (header row): Setting | Default
                    Timeout | 30s

Markdown output

# Release 2.4

This release adds **export** support.

- Faster sync
- Fixed login bug
  - Safari only

| Setting | Default |
| --- | --- |
| Timeout | 30s |

Tips for best results

  • Apply Word's heading styles rather than bold, larger text. Only the styles become # headings.
  • To get a proper header row, select the first row of each table in Word and turn on Layout, Repeat Header Rows. The Table Design checkbox called Header Row only changes the table's colours and is not stored in a way the converter can see.
  • Use Word's own list formatting. Numbers typed by hand are escaped as 1\. so they do not accidentally start a list.
  • Use the Copy button for small documents and Download .md for large ones; both contain the same text.
  • If a sentence contains asterisks or underscores on purpose, expect backslashes in front of them in the Markdown; they disappear again when the Markdown is rendered.

Edge cases to watch

Images are listed in a warning but not included, and no placeholder is written. Add image references by hand after saving the pictures.

Merged cells have no Markdown equivalent. A cell spanning two columns is followed by an empty cell so the column count stays right, and row spans are not represented.

Underline, colour, highlight, font and size disappear, as do alignment and page layout.

Headings deeper than level three are flattened to ###, so a document that relies on Heading 4 and Heading 5 loses that distinction.

Every numbered list starts at 1. A list that continued numbering from an earlier one in Word is written as a fresh list.

Tracked changes are shown as accepted and comments are dropped, so review a document before converting if the revisions matter.

Frequently asked questions

Which Markdown dialect is produced?

GitHub-flavoured Markdown: CommonMark syntax plus pipe tables and strikethrough. It renders on GitHub, GitLab, most wikis and static site generators.

Why does my table have an empty first row?

Markdown tables must start with a header row. When no row of the Word table is marked with Repeat Header Rows, an empty header row is written so the table still renders. Mark the first row in Word's Layout tab to avoid it.

Why are there backslashes in my text?

Characters that Markdown treats as formatting, such as * _ ` [ ] and a number followed by a full stop at the start of a line, are escaped so they render literally. The backslashes vanish when the Markdown is displayed.