Convert a Word File to Markdown and the Comments Disappear — What Pandoc, Mammoth and MarkItDown Keep, and the One Flag That Keeps the Review
Convert a Word file to Markdown with pandoc's defaults and every tracked change is accepted, every comment is dropped, and nothing says so — pandoc wrote 0 bytes of warnings in a 28 November 2026 test. Mammoth and MarkItDown drop the same review. One command keeps it: pandoc -t markdown --track-changes=all.12
The question is a common one. "Easy way to markdown Microsoft Word docs into Obsidian?", opened on the Obsidian forum in January 2023, had 34,122 views on 28 November 2026. "How to easily convert docx to markdown", from April 2023, had 12,541.34
The usual answer is "use pandoc", and it is a good answer. The trouble is the file it is given. A draft that went through review carries more than its text: a colleague's comment, a struck-out date, a sentence someone added. Converted with defaults, the Markdown arrives clean — and looks final.
Mammoth, the Word-to-HTML library under MarkItDown and the Obsidian plugin Docxer, was downloaded 18,978,442 times from PyPI in the month to 28 November 2026.5 Its default reaches a lot of documents.
Below: what pandoc's manual says, where Word stores a review inside the file, three converters measured on files saved by Word, the flag and output format that keep the review, and a check that catches a loss before the original is deleted. Importing notes from other note apps is a different problem, covered in How Well Do Note Apps Import Your Notes?
The review a conversion removes
A reviewed Word file carries two layers: the text, and the review on top — comments, deletions and insertions, each stamped with a name and a time. Converted with defaults, only the text arrives. In the test, a line with "Friday" struck out and "Monday" inserted came out as "The deadline is Monday." — unmarked.1
The test document was small on purpose. A heading; one sentence carrying a reviewer's comment, "Check with finance before we send this."; one tracked edit, with Friday deleted and Monday inserted by a reviewer named Sam; and a line with underline, yellow highlight and red text. It was built with python-docx and is labelled synthetic in this post.1
This is pandoc 3.14's default Markdown, in full:
# Launch plan
We will send the budget to the board.
The deadline is Monday.
[Underlined]{.underline} / [highlighted]{.mark} / red text
The comment is gone, and so is Friday. Nothing in the file suggests a review ever happened. A reader of the note sees a decision — Monday — and no sign that it was one.
The same line from a file saved by Microsoft Word behaved the same way. In a Word 12 document from the Apache POI test suite, two list items deleted under review — one ending "Also known as Maang Tika.", one beginning "Tika Waylan" — vanished from pandoc's default output. Two empty bullet points were all that remained.16
Insertions fared differently: they stayed, as ordinary text. A sentence added in review reads exactly like one written in the first draft.
What pandoc's manual says, and what the terminal says
pandoc documents the default plainly: accept is the default mode, and "Both accept and reject ignore comments." The gap is where people read. The usual command, pandoc report.docx -o report.md, printed nothing — 0 bytes on standard error on every default, accept and all run in the test.21
The full entry in the Pandoc User's Guide, for pandoc 3.14:
"
accept(the default) processes all the insertions and deletions.rejectignores them. Bothacceptandrejectignore comments.allincludes all insertions, deletions, and comments, wrapped in spans withinsertion,deletion,comment-start, andcomment-endclasses, respectively. The author and time of change are included."2
Two more sentences matter. "If a paragraph is inserted or deleted, track-changes=all produces a span with the class paragraph-insertion/paragraph-deletion before the affected paragraph break." And: "This option only affects the docx reader."2
The manual is honest. Nothing here is hidden. It is in the option reference, under a flag most people never look up, because the default output gives them no reason to.
reject is the mirror image. It keeps the deleted words, drops the inserted ones, and also ignores comments. In the Word 12 file, reject restored both deleted list items.1 It is the right mode for one narrow job — recovering the text as it stood before review.
# accept (the default): insertions kept, deletions and comments dropped
pandoc report.docx -o report.md
# reject: deletions kept, insertions and comments dropped
pandoc report.docx --track-changes=reject -o report.md
# all: everything kept, wrapped in spans with author and date
pandoc report.docx -t markdown --track-changes=all -o report.md
Where Word keeps a review, and where the converters cut it
A .docx file is a zip of XML. Deleted words stay in the main text inside a w:del element; inserted words sit inside w:ins; both carry the author and the date. Comment text lives in a separate part, word/comments.xml, tied to the text by range markers. Markdown has no element for any of it.1
This is the review line from the test file's word/document.xml, lightly trimmed:
<w:p>
<w:r><w:t xml:space="preserve">The deadline is </w:t></w:r>
<w:del w:id="11" w:author="Sam" w:date="2026-11-28T09:00:00Z">
<w:r><w:delText xml:space="preserve">Friday</w:delText></w:r>
</w:del>
<w:ins w:id="12" w:author="Sam" w:date="2026-11-28T09:00:00Z">
<w:r><w:t xml:space="preserve">Monday</w:t></w:r>
</w:ins>
<w:r><w:t>.</w:t></w:r>
</w:p>
The deleted word is still in the file — as w:delText, not w:t. Word shows it struck through; a converter that reads only w:t never sees it.
The comment is split in two. In the main text, w:commentRangeStart and w:commentRangeEnd mark the words the comment is about, and a w:commentReference points to it. The comment's own text — "Check with finance before we send this." — sits in word/comments.xml, with the reviewer's name and the time.1
So every converter faces the same choice. Markdown has text, emphasis, links and a few blocks. It has no deletion, no insertion and no margin note. A converter can drop the review, pick one side of each edit, or wrap the review in something Markdown can carry — HTML, or pandoc's attribute spans.
pandoc's all mode takes the third road. Its spans are pandoc's own syntax, not CriticMarkup, the plain-text convention for writing edits inside Markdown — a separate subject. Markdown's own ways of hiding a note inside a file are covered in Three Ways to Hide a Comment in a Markdown Note; a Word comment is a different thing, and none of those three receive it.
The measurement: three files saved by Word, three converters
On 28 November 2026, pandoc 3.14, mammoth 1.13.0 and MarkItDown 0.1.9 converted three files saved by Microsoft Word and one synthetic file. With default settings, no converter kept a comment or a tracked deletion in any file. pandoc's --track-changes=all kept both, with the reviewer's name and date.1
The three Word-saved files are public test fixtures. testComment.docx (Word 16, one comment) and delins.docx (Word 12, tracked deletions and insertions) come from Apache POI; comments.docx (Word 14, two comments) comes from python-mammoth. Each file's docProps/app.xml names Microsoft Office Word as the application.6
| Converter, mode | Comment | Tracked deletion | Insertion | Underline | Highlight | Red text | Warning |
|---|---|---|---|---|---|---|---|
pandoc 3.14, default (accept) | dropped | dropped | plain text | <u> | span.mark | dropped | none |
pandoc 3.14, --track-changes=reject | dropped | plain text | dropped | <u> | span.mark | dropped | none |
pandoc 3.14, --track-changes=all | span, author, date | span, author, date | span, author, date | <u> | span.mark | dropped | none |
| mammoth 1.13.0, default | dropped | dropped | plain text | dropped | dropped | dropped | style warnings |
| mammoth 1.13.0, comment style map | end note | dropped | plain text | dropped | dropped | dropped | style warnings |
| MarkItDown 0.1.9 (lxml 6.1.0) | dropped | dropped | plain text | <u> | dropped | dropped | — |
The pandoc rows were written with -t gfm; pandoc's own Markdown keeps the same underline and highlight as {.underline} and {.mark} classes. The counts behind the table. Of the three documents with comments — two saved by Word, one synthetic — pandoc's default kept comment text in none; all kept it in all three. In the Word 12 file, the two deleted phrases appeared 0 of 2 times by default and 2 of 2 times with reject or all.1
The all output carries the review in full. From the Word 16 file:
this is a <span class="comment-start" data-comment-id="0"
data-author="poi" data-date="2021-05-20T10:57:00Z">comment
content</span>comment <span class="comment-end"
data-comment-id="0"></span>paragraph!
One comment escaped every pandoc mode. python-mammoth's Word 14 file holds two comments, and the second — "Fin." — is anchored to a point, with no range markers around any text. pandoc's all mode kept the first and lost the second; it was absent even from pandoc's internal document tree. Across the three documents, all kept 3 of 4 comments.1
That is a narrow case, and it is the reason for the check further down. The flag keeps what pandoc can anchor. Counting is how to learn whether that was everything.
The warning column is the quiet one. pandoc wrote nothing to standard error on any default, accept or all run. mammoth printed style notices — "Run style with ID CommentReference was referenced but not defined" — that mention comments only by accident, and say nothing about what was dropped.1
The fix: --track-changes=all, written to pandoc's own Markdown
Add --track-changes=all, and write pandoc's own Markdown with -t markdown rather than GitHub-flavoured Markdown with -t gfm. Both keep the review in the note. Only pandoc's Markdown brought it back: converted back to Word, its deletion, insertion and comment returned as a real review. The gfm file came back as "FridayMonday."1
The command:
pandoc report.docx -t markdown --track-changes=all -o report.md
The synthetic file, converted that way:
# Launch plan
[Check with finance before we send this.]{.comment-start comment-id="0"
author="Dana" date="2026-11-28T01:33:50Z"}We will send the budget to the
board. []{.comment-end comment-id="0"}
The deadline is [Friday]{.deletion author="Sam"
date="2026-11-28T09:00:00Z"}[Monday]{.insertion author="Sam"
date="2026-11-28T09:00:00Z"}.
[Underlined]{.underline} / [highlighted]{.mark} / red text
Every part of the review is here. The comment's text sits at the start of the range it covers, with Dana's name and the time; Friday is marked as a deletion and Monday as an insertion, both by Sam. Underline and highlight survive as classes.
The same flag with -t gfm writes the review as raw HTML span elements with data-author and data-date attributes. It reads the same way in a text editor. The difference shows on the way back.
The round trip, run on 28 November 2026:
# GitHub-flavoured: the review does not come back
pandoc report.docx -t gfm --track-changes=all -o report-gfm.md
pandoc report-gfm.md -f gfm -o back-gfm.docx
pandoc back-gfm.docx -t plain # The deadline is FridayMonday.
# pandoc's Markdown: the review comes back
pandoc report.docx -t markdown --track-changes=all -o report-pd.md
pandoc report-pd.md -f markdown -o back-pd.docx
From the gfm file, Word got both words as ordinary text — "FridayMonday." — with no deletion or insertion marks, and an empty comments part. The comment's words were not lost; they landed in the body as ordinary text, run into the sentence they were about: "Check with finance before we send this.We will send the budget to the board." From pandoc's Markdown, Word got one w:del, one w:ins, and the comment back in word/comments.xml, under Dana's name.1
So the choice of output format is a choice about the future. If the Markdown is the end of the line, either works. If the review might have to go back to Word — to a co-author, to an editor — use -t markdown.
Mammoth and MarkItDown: what the opt-ins can and cannot keep
Mammoth ignores comments by default, and says so. A one-line style map brings them back as numbered notes at the end of the document. Its README describes no option for tracked changes. MarkItDown runs mammoth underneath, adds an underline rule and passes no comment mapping, so its Markdown carries no review.78
The README's wording: "By default, comments are ignored. To include comments in the generated HTML, add a style mapping for comment-reference."7 The mapping is a single line:
echo 'comment-reference => sup' > comments.map
mammoth report.docx --output-format=markdown --style-map=comments.map
With the map, the synthetic file's comment came back as a numbered reference after the sentence and an entry at the end — "Comment [D1]Check with finance before we send this." In python-mammoth's Word 14 file, both comments returned, including the point-anchored "Fin." that pandoc lost.1
Deletions did not return, in any mode. Mammoth kept "Monday", dropped "Friday", and wrote no mark — the same result as pandoc's default. For a document still under review, that rules mammoth out on its own.
Underline is gone by design, and the reason is sensible: "By default, the underlining of any text is ignored since underlining can be confused with links in HTML documents."9 In the Word 12 file, the underlined link text lost its <u>.1
MarkItDown changes one thing. Its Word converter appends a rule, _UNDERLINE_STYLE_MAP = "u => u", to mammoth's style map, and depends on mammoth>=1.12.2,<2.8 So underline survives in MarkItDown when it does not in mammoth. No comment mapping is passed, and the test found no comment or deletion in its output. What MarkItDown is, and how its converters are organised, is covered in How MarkItDown Turns Any File Into Markdown.
One dated note: with lxml 6.2.0, released on 27 November 2026, MarkItDown 0.1.9 failed on every .docx in the test — "Could not find the body element: are you sure this is a docx file?" — which appears to be caused by the new lxml release, since the same files converted under lxml 6.1.0. As of 28 November 2026, lxml 6.2.0 and MarkItDown 0.1.9 were still the latest releases on PyPI.11011
Docxer, an Obsidian plugin that converts Word files with mammoth, puts the choice in a setting. Its toggle is labelled "Import docx comments", with the description "Import comments from docx files using reference links. Comments will be placed at the end of the markdown file." It is off by default.12
Check a file before and after you convert it
Count the review before converting, then count it again in the Markdown. A short Python script reads the .docx directly and reports deletions, insertions and comments; three grep counts read the converted note. Zero in the note against any number in the file is the alarm — and the comment count caught a loss in this test.1
Before converting:
python3 - report.docx <<'EOF'
import sys, zipfile, re
z = zipfile.ZipFile(sys.argv[1])
doc = z.read("word/document.xml").decode("utf8")
com = z.read("word/comments.xml").decode("utf8") if "word/comments.xml" in z.namelist() else ""
print("deletions: ", len(re.findall(r"<w:del\b", doc)))
print("insertions:", len(re.findall(r"<w:ins\b", doc)))
print("comments: ", len(re.findall(r"<w:comment\b", com)))
EOF
It uses only Python's standard library, and it does not change the file. On the synthetic file it printed 1, 1 and 1. On python-mammoth's Word 14 file it printed 2 comments.1
After converting with -t markdown --track-changes=all:
grep -o '{\.deletion' report.md | wc -l
grep -o '{\.insertion' report.md | wc -l
grep -o '{\.comment-start' report.md | wc -l
On the Word 14 file, the last count was 1. Two comments went in; one came out. That is the point-anchored "Fin." — the loss described above, found by counting rather than by reading.1
Comments compare one to one. Edits do not: Word may split one change across several elements, and whole-paragraph changes add paragraph-deletion spans. The Word 12 file counted 4 w:del elements and produced 2 deletion spans plus 2 paragraph-deletion spans.1 Read the edit counts as a floor — any edits in the file and none in the note means the review was dropped.
The fastest check needs no script. Search the converted note for a word you know was deleted. If it is not there, the conversion accepted the review for you.
Trade-offs: what the flag costs, and what no flag keeps
--track-changes=all keeps the review and makes the note harder to read: each change becomes a span with an author and a timestamp, and reviewers' names travel with the file. Red text was lost in every mode of every tool. The flag keeps decisions; it does not make them.1
Size is the first cost. The Word 12 file's all output was 5,172 bytes against 2,027 by default — about two and a half times as long, nearly all of it markup.1 In a reading view that renders spans, it looks close to normal. In a plain text editor, it reads like a log.
Names are the second. With all, every comment and edit carries its author and timestamp into the Markdown: "Dana", "Sam", "poi" and "Michael Williamson" in this test.1 A note shared further than the original document went may carry those names to people who were never meant to see them. Check before sharing.
The third cost is work. The spans have to be resolved by hand — keep Monday, delete the Friday span, answer the comment, remove it. If the review is already finished, the cleaner path is to accept or reject the changes in Word first, then convert with defaults. The default is right for a finished document. It is wrong only for one still in review.
Colour is outside every mode. pandoc, mammoth and MarkItDown all dropped the red text, with or without a flag.1 Why Markdown has no safe way to keep it is covered in Colored Text in Markdown. A page break is another Word feature with no Markdown element; what each tool uses instead is in Markdown Has No Page Break.
The pattern is not unique to Word. Converting a note to plain text loses something just as quietly — link URLs, measured in Convert a Note to Plain Text and the Links Lose Their URLs. Each format keeps what it has a place for.
What was tested, and what was not
Four files were converted on 28 November 2026: three saved by Microsoft Word — versions 12, 14 and 16 in their metadata — from the Apache POI and python-mammoth test suites, and one built with python-docx, labelled synthetic. No file was saved in the current release of Word for this test. The behaviour belongs to the file format.16
Versions: pandoc 3.14, released 12 November 2026, from the official release archive; mammoth 1.13.0; MarkItDown 0.1.9, run under lxml 6.1.0 for the results in the table.1
Counts are of known phrases. A comment, deletion or insertion was scored as kept when its words appeared in the output — "comment content", "Maang Tika", "Tika Waylan", "Check with finance", "Friday", "Monday". The round trip was checked by reading the rebuilt file's XML.1
The synthetic file is minimal. Word writes more structure than python-docx does, which is why the headline counts rest on the three Word-saved files, and the synthetic file serves only as the clearest example.
The usual command was checked too: pandoc report.docx -o report.md, which writes pandoc's own Markdown, dropped the same comments and deletions as -t gfm, again without a warning.1 The forum view counts were read on 28 November 2026 and will move.34
Frequently Asked Questions
Does pandoc keep Word comments when converting to Markdown?
Not by default. pandoc's manual says "Both accept and reject ignore comments", and accept is the default. Add --track-changes=all to keep them as spans with the reviewer's name and date. In a 28 November 2026 test with pandoc 3.14, all kept 3 of 4 comments; one with no marked text range was lost.
Why did my tracked changes get accepted when I converted to Markdown?
Because accepting them is the default. pandoc's --track-changes option defaults to accept, which keeps insertions as plain text and drops deletions, with no warning. Mammoth and MarkItDown give the same result. To keep both sides of each edit, convert with pandoc -t markdown --track-changes=all; to recover the pre-review text, use --track-changes=reject.
How do I convert docx to Markdown and keep comments?
Use pandoc report.docx -t markdown --track-changes=all -o report.md. Comments become spans holding the comment text, author and date, next to the words they cover, and tracked edits are kept too. Mammoth can also keep comments, as end notes, with a style map, but it drops tracked deletions in every mode.
How do I keep comments with mammoth?
Add a style mapping for comment-reference. Save the line comment-reference => sup to a file and pass it with --style-map. Mammoth then writes a numbered reference where each comment sits and the comment text at the end of the document. In a 28 November 2026 test, mammoth 1.13.0 kept every comment this way, but no tracked deletion.
Can I convert Markdown back to Word with the tracked changes intact?
Yes, if the Markdown is pandoc's own. In a 28 November 2026 test, -t markdown --track-changes=all output converted back to Word with its deletion, insertion and comment restored. The same review written with -t gfm came back as plain text — "FridayMonday." — with the comment's words merged into the body text. Use pandoc's Markdown whenever the review may return to Word.
Does MarkItDown keep Word comments or tracked changes?
No. MarkItDown converts Word files with mammoth and adds a rule that keeps underline, but passes no comment mapping. In a 28 November 2026 test, MarkItDown 0.1.9 dropped every comment and tracked deletion and kept inserted text as plain text. For a reviewed document, pandoc with --track-changes=all keeps the review.
Is there an easy way to markdown Microsoft Word docs into Obsidian?
pandoc converts a .docx in one command, and the Docxer plugin converts inside Obsidian using mammoth. For a reviewed draft, either resolve the review in Word first or use pandoc -t markdown --track-changes=all. Docxer's "Import docx comments" setting is off by default, and mammoth drops tracked deletions either way.
A reviewed draft is a conversation. Converted with defaults, it arrives as a verdict.
mnmnote.com keeps notes as open Markdown files on your own device — which is why it is worth knowing, before a converted draft goes in, exactly what the conversion took out.
Footnotes
-
MNMNOTE, converter test run, 28 November 2026. pandoc 3.14 (official release archive) with
-t gfmin default,accept,rejectandallmodes,-t markdown --track-changes=all, and round trips back to.docx; mammoth 1.13.0 with and without the style mapcomment-reference => sup; MarkItDown 0.1.9 under lxml 6.2.0 and, separately, lxml 6.1.0, with beautifulsoup4 4.15.0. Inputs: three test fixtures saved by Microsoft Word (see the Apache POI and python-mammoth note below) and one synthetic file built with python-docx 1.2.0. Kept or dropped was scored by searching each output for known phrases; standard error was recorded for every run. ↩ ↩2 ↩3 ↩4 ↩5 ↩6 ↩7 ↩8 ↩9 ↩10 ↩11 ↩12 ↩13 ↩14 ↩15 ↩16 ↩17 ↩18 ↩19 ↩20 ↩21 ↩22 ↩23 ↩24 ↩25 ↩26 ↩27 ↩28 ↩29 -
Pandoc User's Guide,
--track-changes=accept|reject|all, pandoc 3.14. John MacFarlane. https://pandoc.org/MANUAL.html and https://github.com/jgm/pandoc/blob/3.14/MANUAL.txt, accessed 28 November 2026. ↩ ↩2 ↩3 ↩4 -
"Easy way to markdown Microsoft Word docs into Obsidian?", Obsidian Forum, topic 53095, opened 25 January 2023; 34,122 views on 28 November 2026. https://forum.obsidian.md/t/easy-way-to-markdown-microsoft-word-docs-into-obsidian/53095 ↩ ↩2
-
"How to easily convert docx to markdown", Obsidian Forum, topic 57695, opened 8 April 2023; 12,541 views on 28 November 2026. https://forum.obsidian.md/t/how-to-easily-convert-docx-to-markdown/57695 ↩ ↩2
-
pypistats.org, mammoth recent downloads,
last_month18,978,442, read 28 November 2026. https://pypistats.org/packages/mammoth ↩ -
Test fixtures:
delins.docxandtestComment.docxfrom the Apache POI test data, https://github.com/apache/poi/tree/trunk/test-data/document;comments.docxfrom the python-mammoth test data, https://github.com/mwilliamson/python-mammoth/tree/master/tests/test-data. Each file'sdocProps/app.xmlgives the application as Microsoft Office Word, versions 12.0, 16.0 and 14.0. Accessed 28 November 2026. ↩ ↩2 ↩3 -
python-mammoth README, "Comments". Michael Williamson. https://github.com/mwilliamson/python-mammoth/blob/master/README.md, accessed 28 November 2026. ↩ ↩2
-
microsoft/markitdown,
packages/markitdown/src/markitdown/converters/_docx_converter.pyandpackages/markitdown/pyproject.toml,mainbranch. https://github.com/microsoft/markitdown/blob/main/packages/markitdown/src/markitdown/converters/_docx_converter.py, accessed 28 November 2026. ↩ ↩2 -
python-mammoth README, "Underline". Michael Williamson. https://github.com/mwilliamson/python-mammoth/blob/master/README.md, accessed 28 November 2026. ↩
-
lxml release history, PyPI: 6.2.0 uploaded 27 November 2026; 6.1.0 uploaded 18 April 2026. https://pypi.org/project/lxml/#history, accessed 28 November 2026. ↩
-
"lxml 6.2.0: namespace declarations are dropped from XML and ZCML", collective/zpretty issue #255, opened by ericof, 27 November 2026. https://github.com/collective/zpretty/issues/255 ↩
-
Developer-Mike/obsidian-docxer,
src/settings.ts(setting "Import docx comments", defaultimportComments: false) andpackage.json(dependencymammoth). https://github.com/Developer-Mike/obsidian-docxer/blob/main/src/settings.ts, accessed 28 November 2026. ↩