Browser-based document converter · HTML to DOCX

HTML to Word Converter

Turns a web page or HTML snippet into a Word document with real heading styles, nested lists, tables and links.

Input

HTML files (.html, .htm), up to 25MB

Drop your HTML file here or click to choose

.html, .htm, .xhtml

or paste

Files are read and converted on your device. Nothing is uploaded, and the result is yours to download or open in the Word editor.

Result

DOCX file, ready to download or edit

Choose a file to see the DOCX result here.

HTML to Word Converter

Operator: Abdulla Al Fahad. How tools are built and checked

Copying a web page into Word rarely gives you a usable document: fonts change, bullets become stray symbols and headings arrive as oversized body text. The HTML to Word Converter reads the markup itself instead of the rendered page. Each <h1> to <h6> becomes a Word heading style, <ul> and <ol> become real Word lists with their nesting, <table> becomes a Word table with its header row, and <a> links stay clickable.

HTML reaches people in many forms: a page saved from a browser, an export from a CMS or a help centre, an email template, a report generated by a script. You can drop any of those as a .html file, or paste a fragment copied from the Elements panel of the browser's developer tools, which is the most reliable way to grab exactly one article from a page full of menus. The paste box starts empty; the Try a sample button fills it with a short page so you can see how headings, a nested list and a table come through.

Key features

  • Uses the browser's own HTML parser, so unclosed tags, CMS markup and email-template HTML are handled the way a browser would handle them.
  • Reads inline style attributes for colour, highlight, weight, italics, underline, strikethrough, font family, font size and alignment.
  • Keeps table grids aligned when cells span columns or rows, and recognises header rows from <thead> or <th>.
  • Turns GitHub-style task-list checkboxes into ☐ and ☑ characters.
  • Removes scripts, stylesheets, navigation, hidden elements and form controls automatically, and reports skipped images.
  • Accepts a pasted fragment or a .html file, and names the Word document after the page's <title> when there is one.

How HTML elements become Word formatting

The converter walks the HTML document after the browser has parsed it. Block elements map directly: h1 and h2 keep their level, h3 to h6 are written as Heading 3, <p> and loose text inside a <div> become paragraphs, <blockquote> becomes an indented paragraph, <pre> keeps its line breaks as a code block, and <hr> becomes an empty paragraph. Inline tags carry formatting onto the text: <strong> and <b> for bold, <em> and <i> for italic, <u> for underline, <s> and <del> for strikethrough, <code> for monospace text, <mark> for a yellow highlight.

Inline style attributes are read as well: color, background-color, font-weight, font-style, text-decoration, font-family, font-size (pixel sizes are converted to points at 0.75pt per pixel) and text-align. Rules in a <style> block or an external stylesheet are not applied, because the converter does not run a layout engine. Tables use <thead>, or a first row made only of <th> cells, as the header row. Cells that span columns are followed by empty cells so the grid stays aligned, row spans are padded the same way, and nested tables are flattened into the text of their cell. Links are kept when they point at http, https or mailto addresses.

Some elements are dropped on purpose: <script>, <style>, <nav>, <iframe>, <svg>, <video>, form controls and anything marked hidden or aria-hidden. <img> elements are counted and reported in a warning rather than embedded, since the image files are not part of the HTML. Checkboxes are the one form control that survives, as ☐ or ☑ characters, so task lists copied from GitHub keep their state.

How it works

The markup is parsed with the browser's DOMParser into a document tree. The converter walks that tree once, turning block elements into paragraphs, headings, list items and table rows, and collecting inline formatting from each element's tag and style attribute as it descends. Whitespace is collapsed the way a browser renders it, except inside <pre>.

List nesting is tracked by depth, so a <ul> inside an <li> becomes a second-level Word list rather than a separate list. Table cells are placed on a grid that accounts for colspan and rowspan before the rows are written, which is what keeps columns aligned in Word.

Common use cases

  • An editor saves a long web article as a Word file so a colleague can review it with tracked changes.
  • A support team turns a help-centre page exported as HTML into a printable Word handout.
  • A developer converts an HTML report produced by a build or monitoring script into a document for management.
  • A marketing team wants the copy of an HTML email template in Word for legal review.
  • An organisation migrating an old intranet exports the pages as HTML and needs them as editable documents.

How to use this tool

  1. Paste your HTML into the text box and choose Convert text, or drop a .html file on the upload area.
  2. Look at the top and bottom of the preview for menu items or footer boilerplate that came along with the content, and note anything to delete.
  3. Check that the table's first row is shown as a header and that sub-bullets sit under their parent items.
  4. Download the .docx, or open the result in the Word editor to delete leftovers and adjust heading styles first.

Example

HTML input

<h2>Highlights</h2>
<p>Revenue grew <strong>12%</strong>, see the
  <a href="https://example.com/report">full report</a>.</p>
<ul>
  <li>Six engineers hired
    <ul><li>Four in Berlin</li></ul>
  </li>
</ul>
<table>
  <tr><th>Region</th><th>Revenue</th></tr>
  <tr><td>Europe</td><td>€1.2m</td></tr>
</table>

Word document structure

Heading 2: Highlights
Paragraph: Revenue grew [bold]12%[/bold], see the [link]full report[/link].
Bullet (level 1): Six engineers hired
Bullet (level 2): Four in Berlin
Table (header row): Region | Revenue
                    Europe | €1.2m

Tips for best results

  • Paste only the part of the page you want. In the browser's developer tools, right-click the article's main element and copy its outer HTML; that leaves the menus, sidebars and footer behind.
  • If a page is rendered by JavaScript, View Source will not contain the text. Copy the HTML from the Elements panel of the developer tools instead, which shows the rendered DOM.
  • Headings are recognised from heading tags only. A <div> with large bold text is still a paragraph, so set the heading style in the Word editor afterwards.
  • A <footer> is kept because many documents end with useful text there. If the converted file ends with site boilerplate, delete those paragraphs in the editor before downloading.
  • The warning line after conversion counts the images that were skipped, which tells you how many pictures to put back in Word.

Edge cases to watch

Formatting defined in CSS classes does not come through. Only inline style attributes on the elements themselves are read, so a page that relies on a stylesheet for bold labels or coloured notes will lose those styles.

Tables used for page layout are converted like any other table. Old-style pages that position content with a two-column table will produce a two-column Word table around the text.

Pixel font sizes become points. A span with font-size 14px becomes 10.5pt text, which is slightly smaller than Word's default 11pt.

Form controls other than checkboxes are removed: buttons, text fields and select menus disappear along with their labels' meaning.

Images, iframes, SVG graphics and videos are left out. Charts drawn as SVG disappear entirely, and alt text is not used as a substitute.

Nested tables are flattened. The inner table's cells are written into the outer cell as lines of text, so rebuild them in Word if you need the grid.

Frequently asked questions

Can I convert a web page by entering its URL?

No. Browsers do not let a page on one site read the HTML of another site, and this tool makes no network requests of its own. Save the page as HTML, or copy its markup from the developer tools, and paste or upload that.

Does it apply the page's CSS?

Only inline style attributes are read. Stylesheet rules, classes and media queries are ignored, so formatting that depends on them will not appear in the Word file.

Why did a page layout turn into a table in Word?

Older pages arrange content with <table> elements. The converter cannot tell a layout table from a data table, so it converts both. Paste just the article's element from the developer tools to avoid the outer layout table.

What happens to menus and hidden text?

Content inside <nav>, elements with the hidden attribute or aria-hidden="true", and anything styled display:none is left out. Everything else in the body, including footers, is converted.