In various cases, you may need to convert the HTML content to a Word document. For example, for generating the document from a WYSIWYG HTML editor or converting a web page to DOCX or DOC format. To perform this conversion programmatically, this article covers how to convert HTML files to Word DOCX, DOC, DOCM, or other formats in Java.