Skip to converter

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.

Drop files here or DOCX, up to 8 MB
    Add a file to start.

    Processed on your device. Files aren’t sent anywhere.

    No sign-up. Nothing to install.

    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 sourceIn the outputReason
    Heading and body textkept as elementsstructure carries
    Table rows and cellskept as a tablestructure carries
    Font face, size, colourremovedstyling is not part of the output
    Embedded images and chartsdroppednot copied into the markup
    Scripts and embedded objectsremovednever executed, never carried
    Links judged unsaferemovedonly safe destinations are kept
    Comments and text boxesnot a reliable part of the reading orderannotations 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?
    No. Output is a reflowed document: fonts, margins, colours and page breaks are not reproduced, and your site's stylesheet supplies the appearance.
    Are the footnotes always included?
    Not guaranteed. HTML and Markdown output can include linked notes, while plain text extracts the body. Verify the notes in the converted file rather than assuming either behaviour.
    Does the converter run macros in the document?
    No. Scripts and macros are never executed; the container is read with vendored libraries inside the browser tab.
    Can I paste the output into a CMS?
    Yes, as body markup. Because styling was stripped, your CMS or stylesheet provides the headings' appearance and the table borders.

    Publishing the result

    A worked pass on one report, in order:

    1. Convert the .docx and download the .html file.
    2. Open it in a browser to read the reflowed outline, not in Word.
    3. Confirm the heading levels match the outline you want in navigation.
    4. Check that the tables read correctly at your site's width.
    5. Confirm no image placeholders or empty sections were expected.
    6. 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.

    Share this converter

    More sharing options