Skip to the content

Contact usFree tools · No signup · Files stay on your device

Developer Tools

HTML to Word: the complete guide to saving HTML as DOCX

HTML to Word: the complete guide to saving HTML as DOCX

HTML is made for browsers, not for printing or editing in an office. When someone asks for "the Word version" of a web page, a help article or a table you have built in code, the usual answer is to copy and paste and fix the mess afterwards. Our free HTML to Word converter does it properly: you paste the HTML or open a saved .html file, choose a few options, and get a .docx with real Word headings, lists, tables and links.

This guide covers every setting on the page, exactly what is kept and what is dropped, and how to solve the problems people meet most, such as missing pictures and lost colours.

What HTML to Word does

The tool reads your HTML the way a browser does and walks through it from top to bottom. Each part becomes the matching part of a Word document, written with Word's own styles. It is a clean rebuild of the content, not a picture of the web page.

It keeps:

  • Headings, which become Heading 1 to Heading 4 styles, so they show in Word's navigation pane.
  • Paragraphs and line breaks.
  • Bold, italic, underline, strike-through, text colours and code in a typewriter font.
  • Bulleted and numbered lists, including nested ones, written as real Word lists.
  • Tables, block quotes, code blocks and horizontal lines.
  • Links that start with http, https or mailto.
  • Pictures that are embedded in the HTML.

It does not copy the look of the page: layout columns, backgrounds, web fonts and anything defined in a stylesheet. You choose one font and one text size for the whole document instead.

How to use HTML to Word, step by step

  1. Open HTML to Word.
  2. In the HTML panel, paste your code into the box labelled "HTML to convert". Or press Open file and pick a .html, .htm or .xhtml file. If you only want to see how it behaves, press Try an example.
  3. In the Word options panel, choose the Font, Text size, Page size and Margins.
  4. Press Convert to Word & download. The .docx is saved to your device straight away.
  5. Read the Result panel. It says "Done:" with the file name, lists any notes about what was left out, and shows the size of the HTML and of the Word file with counts of headings, paragraphs, tables and pictures. Press Download again if you need another copy.
  6. Open the file in Word, Google Docs or LibreOffice.

The button stays disabled while the box is empty. The Clear button removes the code and any chosen file so you can start again.

Every option explained

Font

Calibri, Times New Roman or Arial. This sets the font for the whole document. Code and preformatted text always use Courier New, whatever you choose. The font in your HTML is ignored, apart from the typewriter font for code.

Text size

Small (9 pt), 10 pt, Normal (11 pt), 12 pt or Large (14 pt). This is the size of ordinary text. Headings are worked out from it: Heading 1 is 1.8 times the text size, Heading 2 is 1.45 times, Heading 3 is 1.2 times and Heading 4 is 1.05 times. So choosing a larger text size makes the headings larger too. Use 11 or 12 pt for letters and reports, 9 or 10 pt for long tables.

Page size

A4 or US Letter. In Bangladesh, A4 is the right choice for almost everything. US Letter is a little shorter and wider and is the usual paper size in North America.

Margins

Narrow (1.27 cm), Normal (2 cm) or Wide (2.54 cm), applied to all four sides. Narrow fits more on a page, which helps with wide tables. Wide is the traditional 1-inch margin.

Changing any option clears the earlier result, so press Convert to Word & download again after a change.

What it accepts and its limits

  • Input: pasted HTML of any length, or an .html, .htm or .xhtml file. Partial HTML, such as a few paragraphs with no <html> or <body>, works.
  • Pictures: data: pictures in PNG or JPG format only. They are scaled down to fit the page width and height and never enlarged. If the <img> has width and height attributes or CSS sizes in pixels, those set the starting size.
  • Links: http, https and mailto only. Any other link, such as javascript:, keeps its words but loses the link.
  • Colours: hex codes such as #c0392b, rgb() and rgba() values and a set of common colour names, taken from inline style attributes and the color attribute of <font>. Colours that are almost white are dropped, because the Word page is white and the words would vanish.
  • Never shown: scripts, styles, forms controls, frames, audio, video, canvas, SVG drawings and anything hidden with display:none, visibility:hidden or the hidden attribute.
  • Empty result: if there is nothing visible to convert, you see "There is nothing to put in the Word file. Check that the HTML has some visible text."

Only the style attribute on an element is read. Colours that come from a class and a stylesheet, whether inside a <style> block or in a separate file, are not applied, because the converter does not run a layout engine.

Privacy

HTML to Word runs in your browser. Your code and the document stay on your device, and scripts inside the HTML are never executed. The page cannot fetch other websites for you either, which is why it cannot convert by web address. To convert a live page, open it in your browser, press Ctrl+S to save it as an HTML file, and open that file here.

A worked example

Suppose a school sends this notice as HTML:

<!DOCTYPE html>
<html>
<head><title>Fee notice</title></head>
<body>
<h1>Fee notice</h1>
<p>Dear parents, the <b>HSC</b> exam fee is due by <span style="color:#c0392b">15 December</span>.</p>
<h2>Fees</h2>
<table>
  <tr><th>Item</th><th>Amount</th></tr>
  <tr><td>Exam fee</td><td>Tk 1,200</td></tr>
</table>
<ul>
  <li>Pay at the school office</li>
  <li>Pay by bKash: <a href="https://example.com/pay">payment page</a></li>
</ul>
</body>
</html>

Paste it, keep Calibri, Normal (11 pt), A4 and Normal (2 cm), and convert. You get a file called "Tech Solution Point - Fee notice.docx", taken from the title tag. In Word:

  • "Fee notice" is a Heading 1 and "Fees" is a Heading 2, both visible in the navigation pane.
  • "HSC" is bold and "15 December" is in the red you chose.
  • The table has light grey borders and fills the width of the text.
  • The two list items are real bullets, and "payment page" is a blue underlined link.

The Result panel reports 2 headings, 3 paragraphs (the first paragraph plus the two list items), 1 table and 0 pictures.

Tips to work faster

  • Turn on Try an example once to see how each kind of element comes out before you convert your own page.
  • To keep a picture, convert it into a data URL first. The Base64 Encoder/Decoder gives you one with its Copy data URL button, and the guide on embedding an image as Base64 shows how to put it in an <img> tag.
  • Keep very large tables on narrow margins and a smaller text size, then check the page in Word.
  • Before you paste, delete navigation menus and footers from the HTML if you do not want them in the document. They are ordinary text to the converter.
  • If you need a PDF rather than an editable file, use HTML to PDF.

Common problems and how to fix them

A yellow note says pictures were "left out"

The note reads, for example, "3 pictures from the web were left out — pictures load only when embedded (data: URLs)." The HTML refers to pictures by address, and a browser page cannot download them for you. Save the images, convert them to data URLs and paste the new code, or insert the pictures in Word afterwards. If an <img> has alt text, that text appears in the document where the picture would be.

A note says pictures in "a format other than PNG or JPG" were left out

Embedded GIF, WebP and SVG pictures are skipped. Convert them to PNG or JPG first, for example with WebP to JPG or SVG to PNG. Inline SVG drawings have their own note, "inline drawings (SVG) were left out."

The colours or spacing look different from the web page

The converter reads inline colours only. A class such as class="warning", with its colour defined in a stylesheet, has no effect. Add a style="color:..." attribute to the elements that matter, or recolour them in Word. Spacing comes from Word's own styles, so it will never match the page pixel for pixel.

Each cell is flattened to a single line of plain text. If a cell contains a list or a second paragraph, the pieces are joined with spaces. Keep cell content simple, or re-apply bold in Word. A colspan is respected by adding empty cells, up to 20.

"There is nothing to put in the Word file"

The HTML contains no visible text. This happens when the text is inside a script, a style block or a hidden element, or when you pasted only an image tag with a web address.

The file name is not what I expected

An opened file keeps its own name. For pasted code the title tag is used, so an HTML snippet with no title is saved as html-to-word.docx. Rename it after you download it.

Quick checklist

  • Paste the full HTML, or open the saved page.
  • Choose A4, Calibri 11 pt and 2 cm margins unless you have a reason not to.
  • Embed pictures as PNG or JPG data URLs.
  • Use inline colours, not classes.
  • Read the notes in the Result panel before you send the file.

Frequently asked questions

Why do my pictures not appear in the Word file?
Only pictures stored inside the HTML as data: PNG or JPG are placed in the document. A picture that points to a web address or a file path cannot be fetched by the browser, so it is left out. If the picture has alt text, that text is written in its place, and a yellow note tells you how many pictures were left out.
Why is my table plain, with no colours?
Table cells are turned into plain text in a clean grid with light grey borders. Bold, links and background colours inside the cells are not carried over, and a table inside a table is flattened to one line of text per cell.
Which names does the saved file get?
If you opened a file, its name is used. If you pasted code, the name comes from the page's title tag, cleaned and cut to 60 characters. With neither, the file is called html-to-word. The download starts with Tech Solution Point - before the name.
Do I need a full HTML page, or is a snippet enough?
A snippet is enough. You can paste just a heading and a few paragraphs, with no html or body tags. The browser's own parser fills in the rest, so partial code works as long as it has visible text.
Where does the document title in Word's File menu come from?
From the title tag of your HTML. It is saved in the file's properties and is not printed on the page. The author property is set to Tech Solution Point.
Found this useful? Share it

Tools in this guide

Main tool

HTML to Word

Turn HTML code or a saved web page into an editable Word document without installing anything.

Open tool

Word to HTML

Turn a Word document into clean, semantic HTML you can paste into a website, CMS or e-mail.

Open tool

HTML to PDF

Turn HTML code or a saved web page into a clean PDF without installing anything.

Open tool

Word to PDF

Turn a Word document into a PDF without installing anything.

Open tool

Back to all guides & blog