Why Migrating Word Documents to Markdown Breaks Tables and Equations
Moving a thesis chapter, textbook draft, or engineering specification from Microsoft Word into Obsidian, Notion, GitHub, or an AI workflow by simply copying and pasting almost always fails in the same two places: tables collapse into tabbed plain text, and native Word equations either vanish completely or flatten into unreadable characters like a/b.
Because a .docx file is actually a ZIP archive containing structured ECMA-376 Office Open XML files, reading the underlying XML directly preserves everything that clipboard plain-text drops. Converting an entire Word file takes three steps:
- Drop your
.docxfile: Select or drag any.docxdocument into the local dropzone—your file stays strictly inside browser memory (or try one of the built-in presets). - Verify the extracted structure: Inspect the Markdown Source tab or switch to Rendered Preview to check every heading, GFM table, and KaTeX equation.
- Copy or download: Click Copy Markdown for instant clipboard pasting, or Download
.mdto save a Markdown file locally.
Word-to-Markdown Element Mapping Guide
Knowing how Word styles and XML nodes translate into GitHub Flavored Markdown helps you get the cleanest output from existing documents.
Handling Equations Inside Paragraphs and Table Cells
Many naive .docx extractors either strip equations out completely or dump every equation into a separate list at the bottom of the file, disconnecting formulas from the surrounding prose.
Our parser walks <w:p> children in exact document order:
- Inline equations stay inline: A formula like
<m:oMath>inside a sentence becomes$L(N)$right where it belongs in the paragraph. - Centered display equations become block math: Standalone
<m:oMathPara>or centered<m:oMath>paragraphs become clean$$...$$blocks on their own lines. - Table cell formulas remain intact: Even if a Word table contains a fraction like
\frac{TP}{TP+FP}inside a cell alongside bold text or<br>line breaks, the cell is converted into| Precision | $\frac{TP}{TP+FP}$ | **0.938** |without breaking pipe alignment.
Optimizing Output for Obsidian, Notion, and AI Prompts
- Obsidian & GitHub: Standard
$...$and$$...$$math delimiters are output automatically, so both platforms render inline equations, block math, and GFM pipe tables natively. - ChatGPT / Claude / DeepSeek: Feeding structured Markdown + LaTeX into an LLM gives dramatically better reasoning accuracy than pasting messy Word plain text.
Real-World Walkthrough: Migrating a Research Summary Back to Markdown
Suppose you have a .docx summary containing an H1 heading (Neural Scaling Summary), an inline equation $L(N)$, a centered quadratic formula block, nested bullet points, and a 3-column metrics table whose middle cell holds an OMML fraction \frac{TP}{TP+FP}.
Dropping the file into the left dropzone unpacks word/document.xml and word/numbering.xml in milliseconds. The summary cards report Tables Extracted: 1 and Equations Extracted: 3. Switching to the Rendered Preview tab confirms that the headings, centered formula, and table with inline KaTeX math match the original Word layout before you click Download .md.
Under the Hood: Local JSZip Unpacking Without Server Uploads
A .docx document is a standard ZIP container. Everything runs strictly inside your browser tab:
text.docx File ──▶ JSZip (word/document.xml + word/numbering.xml) │ ▼ Body Walker (<w:p> Headings/Lists/Code + <w:tbl> Tables) │ ▼ OMML AST Mapper (<m:oMath> → LaTeX) + Run Merger (**bold**) │ ▼ Clean GFM + LaTeX Markdown + Live KaTeX Preview
By unpacking the archive locally and merging adjacent runs that share identical formatting flags, the converter avoids noisy artifacts like **pro****posed** and produces clean, human-readable Markdown ready for version control or knowledge bases.