How the Word to HTML Converter Works
AnyTool Word to HTML reads a Microsoft Word .docx, which is an Office Open XML package — a ZIP archive of XML parts. In the browser it unzips the file with JSZip and parses word/document.xml with the native DOMParser, then walks the WordprocessingML tree and emits HTML directly, with no library round-trip and no server. Paragraphs become <p>, and paragraphs whose style resolves (via word/styles.xml) to Heading 1–6, Title or Subtitle become <h1>–<h6>. Runs carry the formatting: w:b → <strong>, w:i → <em>, w:u → <u>, w:strike → <s>, and superscript/subscript vertical alignment → <sup>/<sub>, with w:br and tabs handled in document order. Lists are reconstructed by reading each paragraph’s numbering reference (numId and indent level ilvl) against word/numbering.xml, grouping consecutive list paragraphs and nesting <ol> or <ul> by whether the level’s number format is a bullet or a counter. Tables map to <table>/<tr>/<td> with first-row cells promoted to <th> and gridSpan honored as colspan.
- A .docx is a ZIP of OOXML; unzipped with JSZip in the browser
- word/document.xml parsed with the native DOMParser — no server
- Heading styles resolved via word/styles.xml to <h1>–<h6>
- Lists rebuilt from numId/ilvl against word/numbering.xml (ol vs ul)
- Tables → <table> with <th> header row and colspan support
