This website is being built. Services described here are not yet available to order; the free tools work now. See what is ready.
SelfPublishingTool

Digital publishing

Why Word's "Save as Filtered HTML" Creates Bloated, Unvalidatable EPUBs

In March 2004, a Microsoft developer named Wayne Kao published a short blog post that began with a confession: “As a web developer, one of my biggest gripes with Office used to be the bloated HTML it would save out.”1 He then showed the remedy that Word had recently gained, a “filtered” HTML export whose generator line read <meta name=Generator content="Microsoft Word 11 (filtered)">.2 That single line of markup, with its unquoted attribute values, is a convenient place to begin any account of Word filtered HTML to EPUB conversion. It is perfectly acceptable to a web browser. It is not acceptable inside an EPUB, whose content documents must follow the stricter rules of XML. Most of the trouble that independent authors meet when they build an ebook from Word’s filtered export can be traced to that gap between what browsers forgive and what ebook validators require.

This article explains what the filtered export removes, what it leaves behind, and why the leftovers collide with the EPUB specification and with EPUBCheck, the standard conformance checker. It also tests the claim in its own title. The evidence supports part of that claim and not all of it, and the distinction matters for anyone deciding whether to start an ebook from Word’s HTML output.

Word saves two different kinds of HTML for two different purposes

Word’s ordinary “Web Page” export was never designed to produce lean markup for the web. Kao explained the design goal directly: “customers expect to be able to open the Word HTML back up without any data loss. After all, they said, if Word can save it, it should be able to open it.”3 To make that round trip possible, he wrote, “the HTML needed to be as expressive as the normal binary .doc format,” and because Word had accumulated many features over the years, the export had to carry a great deal of information.4 The full export therefore includes Office XML namespaces, blocks of document properties wrapped in conditional comments of the form <!--[if gte mso 9]>, and style rules full of Word-specific mso- properties such as mso-pagination.5

Indiana University’s knowledge base, in an archived entry last modified in January 2018, describes the same behavior from the user’s side. It states that Word’s HTML option “does not output pure HTML, but instead adds special tags designed for Microsoft Office,” and that the added XML and CSS tags “can almost double the length of your document.”6 That figure is the source of much of the “bloat” reputation. Note, however, that the Indiana entry is describing Word’s standard HTML output. It is not a measurement of the filtered export.

The filtered export was Microsoft’s answer to that complaint. According to Kao, it is meant for users who “don’t care about reopening in Word and just want some lean, mean HTML.”7 His side-by-side example shows the filtered file dropping the Office namespaces, the conditional XML blocks, and the extra metadata, while retaining a stylesheet in the document head.8 His own verdict was modest: “Not perfect, but not too shabby for a word processor. If you’re super hard core, you can strip it down more by hand or using Frontpage.”9

Two years later, the programmer Jeff Atwood summarized the choice less kindly. Word’s save dialog, he wrote in January 2006, lets you “choose between totally nasty HTML and slightly less nasty HTML.”10 Both descriptions agree on the essential point. Filtering reduces the Office-specific payload but does not turn Word into an HTML authoring tool, and the output still reflects the word processor’s internal model of a document rather than the structure an ebook needs.

The “bloated” half of the title is only partly supported

The bloat claim needs care. The strongest quantitative statement available, Indiana University’s “almost double,” refers to the unfiltered export.11 No source consulted for this article measured the size difference between a filtered Word export and an equivalent hand-coded file, and this article does not offer an invented figure in place of one. What the sources do establish is qualitative: the filtered export is noticeably leaner than the full one, and it still carries a document-level stylesheet built from Word’s style definitions, including page-setup rules such as @page Section1 in Kao’s example.12

For an ebook, the cost of that residue is less about megabytes than about control. A typical novel’s text is small; the file size of most reflowable ebooks is dominated by images, not markup. The practical problem is that the stylesheet Word writes describes a printed page. It encodes margins, page sections, fixed font sizes, and paragraph spacing that were set for Letter or A4 paper. When that stylesheet travels into an EPUB, it competes with the reading system’s own settings and with any stylesheet the author adds later. A file can therefore be modest in size and still be “bloated” in the sense that matters to a formatter: it contains far more styling than the book needs, much of it irrelevant to a screen.

Authors should also distinguish between the two exports when they read troubleshooting advice. A message board post that complains about <o:p> tags, for example, is almost always describing unfiltered output or text pasted from Office. The <o:p> element, as the HTML validation service Rocket Validator explains, “is a Microsoft Office namespace tag that has no meaning in HTML and is not part of any HTML specification,” and it is “only understood by Office applications.”13 Validators flag such tags “because they are not valid HTML elements.”14 Kao’s example indicates that filtering removes the Office namespaces in which these tags live.15 If they appear in a filtered file, the likeliest explanation is that content was pasted into the HTML after export or that the unfiltered option was chosen by mistake.

EPUB content documents must use the XML syntax of HTML

The “unvalidatable” half of the title rests on a structural mismatch. HTML has two serializations. The everyday HTML syntax tolerates unquoted attribute values, unclosed paragraph and list-item tags, and other shortcuts. The XML syntax, often called XHTML, does not. EPUB requires the second. The current EPUB 3.4 draft, a W3C Candidate Recommendation Draft dated 25 November 2026, states in its terminology that “XHTML content documents are expressed using the XML syntax,” and its introduction notes that EPUB 3 “only allows authoring of content documents using the XML syntax.”16 This requirement is not new to the 3.4 draft; it has been a defining feature of EPUB 3 content documents, and readers who need the formal normative text should consult the EPUB 3.3 Recommendation as well as the draft.

Word’s filtered export is written in the forgiving HTML syntax. Kao’s own sample shows it: the generator tag <meta name=Generator content="Microsoft Word 11 (filtered)"> has two unquoted attribute values and no closing slash.17 In a browser, that markup is fine. In an XML parser, it is a fatal error, because XML requires every attribute value to be quoted and every element to be closed. A single such error stops an XML parser from reading the rest of the file.

EPUBCheck reports exactly this class of failure. Its published message list, as of November 2026, includes HTM_001, “Any publication resource that is an XML-based media type must be a valid XML 1.0 document,” alongside the general parsing messages RSC-005, “error while parsing file,” and RSC-016, “Fatal error while parsing file.”18 When an author renames Word’s .htm file to .xhtml, places it inside an EPUB container, and runs EPUBCheck, these are the messages that typically follow. The ebook has not been checked and found wanting on a few details; it has failed at the first step, because the validator cannot parse the content as XML at all.

This is the most defensible reading of “unvalidatable.” The filtered file is not beyond validation; EPUBCheck can and will validate it, and it will report errors. What the filtered file cannot do, without conversion or cleanup, is pass validation as an EPUB content document. The title’s word therefore overstates the case if it is taken literally, and it describes the practical outcome accurately if it is taken to mean that the raw export will not validate.

The filtered export also creates packaging and stylesheet problems

Syntax is the largest obstacle, but it is not the only one. Amazon’s “Basic HTML Formatting Guidelines” page, as of November 2026, explains that saving a Word file as “HTML (Web page, filtered)” creates a separate HTML file and an image folder.19 Those image files and the folder that holds them take their names from Word’s export process and from the document’s own file name. EPUBCheck, as of November 2026, issues PKG_010 when a file name “contains spaces, which may create interoperability issues with older reading systems,” and PKG_009 when a file name “contains characters that are not allowed in OCF file names.”20 A document saved as “My Novel Final v3.docx” is an easy way to inherit those warnings. The fix is mechanical: rename the files and update every reference, but each reference must change, or the images will break.

The stylesheet raises a second set of issues. EPUBCheck’s CSS_008 message, “An error occurred while parsing the CSS,” and its CSS_001 message, “The”%1$s” property must not be included in an EPUB Style Sheet,” exist to catch style rules that a reading system cannot handle or that the specification forbids.21 The sources consulted here do not establish that Word’s leftover mso- declarations trigger either message in current versions of EPUBCheck, and authors should not assume that they do. Under ordinary CSS error handling, an unknown property is usually ignored rather than treated as fatal. The concern with Word’s stylesheet is therefore mainly practical rather than formal. Print-oriented rules for page sections, absolute font sizes, and fixed indents can override reader preferences or display inconsistently across devices, even when they pass the validator.

Finally, the filtered export carries no ebook package at all. An EPUB needs a package document with metadata and a manifest, a navigation document, and a container structure. The EPUB 3.4 draft defines, for example, a unique identifier recorded in dc:identifier, and it notes that “Significant revision, abridgement, etc. of the content requires a new unique identifier.”22 None of this comes from Word’s HTML. An author who starts from the filtered export must build all of it by hand or with another tool.

Conversion tools and retailers treat filtered HTML as an input, not an ebook

The filtered export has a respectable history as an intermediate step, and the sources do not condemn it outright. The calibre user manual, in its guidance on older Word documents, tells users to “be sure to use the”Save as Web Page, Filtered” option” because “this will produce clean HTML that will convert well.”23 The same passage warns that “Word produces really messy HTML, converting it can take a long time, so be patient.”24 For files created in Word 2007 and later, calibre states that it “can automatically convert .docx files,” which removes the need for the HTML step entirely.25

Amazon’s guidance points in a similar direction. Its “Basic HTML Formatting Guidelines” page refers authors to the “HTML (Web page, filtered)” option and, in its discussion of text color, suggests saving “the DOC file as HTML (Web Page, Filtered)” in order to check for forced color coding.26 In other words, Amazon has treated the filtered export as a file its own conversion pipeline can ingest and as a diagnostic view of what Word has done to the text. Neither calibre nor Amazon presents the filtered file as a finished EPUB content document. Each runs it through a converter that rewrites the markup into the form an ebook requires.

Practitioners who have used filtered HTML as a starting point describe the same division of labor. In a 2011 workflow essay published on Joel Friedlander’s site The Book Designer, the formatter Chris O’Byrne wrote that Word “produces (so far) the cleanest HTML file” among the tools he had tried, and then added, “I open that HTML file in BBEdit and spend the next couple of hours cleaning the code.”27 That pairing is a fair summary of the evidence. Among word processors of its era, Word’s filtered export was a workable source, and it still required hours of manual work before it became ebook markup.

A clean path from Word to a valid EPUB uses structure, not export settings

The sources suggest a sequence that avoids most of these problems. It begins inside Word, not at the export stage.

First, apply real paragraph and character styles throughout the manuscript, so that headings, body text, block quotations, and scene breaks are identified by style rather than by manual formatting. A converter can map named styles to clean HTML elements and classes; it can only guess at a paragraph that was made to look like a heading with bold type and a larger font. Amazon’s guidance on using Word’s “Page Break” feature rather than blank lines reflects the same principle: structural intent should be recorded as structure.28

Second, choose a conversion route that writes XHTML for you. Calibre’s direct DOCX input is one such route.29 Retailer and aggregator converters are another. Dedicated ebook production tools are a third. Each of these produces content documents in the XML syntax and builds the package, manifest, and navigation that Word’s HTML lacks.

Third, if you do work from filtered HTML, whether for control or because a workflow requires it, treat the file as raw material. Convert it to well-formed XHTML, replace Word’s stylesheet with a short one written for screens, rename image files without spaces, and then build the EPUB package around the result. Readers who want to do this work by hand will find the structure of the container described in the related articles below.

Fourth, run EPUBCheck on every build. Its messages are specific enough to point to the failing file and line, and the codes quoted above, HTM_001, RSC-005, RSC-016, PKG_009, and PKG_010, are among the first to look for in a file that began life in Word.30

The real lesson concerns syntax, not size

The title of this article frames the problem as one of bloat and validation, and the evidence supports a narrower version of that framing. Word’s filtered export is substantially leaner than its full HTML export, and calibre’s manual still describes it as “clean HTML that will convert well.”31 It is not, however, an EPUB content document. Its markup follows HTML’s forgiving syntax rather than the XML syntax that EPUB requires, its stylesheet describes a printed page, and it arrives with none of the packaging an ebook needs.323334 The quickest way to a valid file is to let a converter write the XHTML from a well-styled DOCX, and to reserve the filtered export for diagnosis or for formatters prepared to rewrite it line by line.

Platform rules, fees and laws change. Facts in this guide are dated to when they were checked; confirm current terms with the platform or authority before relying on them. Nothing here is legal, tax or financial advice.

More guides Free publishing tools