DOCX to HTML — the story reflows, the styling does not
A report written in Word has to become a page. The conversion reads the container and writes reflowed, sanitized markup: the document's structure survives as elements, while everything that made the page look like that report — fonts, colours, margins, images — is dropped, and anything unsafe in the source is deleted rather than carried through.
Page layout, fonts, margins, headers, footers and page breaks are not reproduced: the text stream is reflowed, not re-laid-out.
Processed on your device. Files aren’t sent anywhere.
From paragraphs to elements
Take one report and watch what each part becomes. The mapping is structural, not visual: an element is chosen because it expresses the same role, not because it looks the same.
- Heading paragraphs become heading elements, so the outline of the report survives.
- Body paragraphs become paragraph elements in document order.
- Lists become list elements; the numbering style Word used is not reproduced.
- Tables become table elements with rows and cells, reflowed to the page width.
- Emphasis inside a paragraph can survive as emphasis markup; colour and font face do not.
- Page breaks, headers and footers are page furniture and are not emitted.
What the sanitizer deletes
A Word file can carry more than text, and markup can carry more than structure. Anything that could execute, redirect or restyle the page is removed on output, so the result is safe to drop into a site.
| In the source | In the output | Reason |
|---|---|---|
| Heading and body text | kept as elements | structure carries |
| Table rows and cells | kept as a table | structure carries |
| Font face, size, colour | removed | styling is not part of the output |
| Embedded images and charts | dropped | not copied into the markup |
| Scripts and embedded objects | removed | never executed, never carried |
| Links judged unsafe | removed | only safe destinations are kept |
| Comments and text boxes | not a reliable part of the reading order | annotations are not story flow |
Footnote references in the markup
Footnote handling depends on the output you choose. HTML and Markdown output can include linked notes, while plain text extracts the body only. That means the same .docx produces different content depending on the direction, and neither claim is universal: a document whose notes are unusual may not carry them, so check one note in the converted page before publishing.
If your report depends on citations, open the converted HTML and confirm the reference and its note both appear, in the order you expect.
Questions about publishing the markup
Will the converted page look like the Word document?
Are the footnotes always included?
Does the converter run macros in the document?
Can I paste the output into a CMS?
Publishing the result
A worked pass on one report, in order:
- Convert the .docx and download the .html file.
- Open it in a browser to read the reflowed outline, not in Word.
- Confirm the heading levels match the outline you want in navigation.
- Check that the tables read correctly at your site's width.
- Confirm no image placeholders or empty sections were expected.
- Paste the body into your CMS and let the site stylesheet style it.
Limits on the migration
One file at a time, up to 8 MiB, with the produced markup capped at 400000 characters. A malformed container — a .docx that is not a valid ZIP archive or whose document part cannot be read — is rejected instead of producing a blank page.
Because images are dropped rather than copied, a report heavy in figures loses them; keep the original file for the images and place them yourself.