Digital publishing
Understanding the EPUB File Format
On September 11, 1999, David Ornstein made a small sample ebook to accompany a document called OEB 1.0, the first Open eBook specification. Dave Cramer, recounting the episode for BookNet Canada in 2019, treats that sample as the starting point of the lineage that became the EPUB file format.1 Exactly seven years later, on September 11, 2006, a packaging specification called OCF 1.0 gave those ebooks a single-file container, and on September 11, 2007, two further specifications, OPF 2.0 and OPS 2.0, were published and together “were called EPUB 2.0, since it was a successor to OEB 1.2.”2 The dates are a curiosity, but the sequence matters: EPUB was assembled from separate pieces (content markup, a description of the publication, and a container), and it is still built that way.
This article explains those pieces for an independent author who wants to understand what a conversion tool or a formatter actually produces. It covers who maintains the standard, what sits inside an EPUB file, how the reading order and navigation are declared, which media the format supports, and how the format’s openness interacts with the narrower requirements of retailers. Platform rules are reported as they stood in November 2026 and change often.
The EPUB standard is now maintained by the World Wide Web Consortium
For most of its life, EPUB belonged to the International Digital Publishing Forum (IDPF). On February 1, 2017, the World Wide Web Consortium (W3C) announced that “the World Wide Web Consortium (W3C) and the International Digital Publishing Forum (IDPF) have combined organizations,” and the announcement credited the IDPF with having “developed the EPUB standard used globally for accessible ebooks and digital publications.”3 Cramer’s account places the merger at about the time EPUB 3.1 was finalized and notes that maintenance then passed to the EPUB 3 Community Group, which rolled back the changes in 3.1 that had broken compatibility.4
The version history after EPUB 2 runs as follows in Cramer’s account. EPUB 2.0.1 appeared in September 2010, EPUB 3 was published on October 11, 2011, and a separate fixed-layout specification followed in March 2012.5 EPUB 3.2 was designed so that every EPUB 3.0.1 file would already be valid under it.6 The W3C then took EPUB through its formal standards process. On May 25, 2023, it announced that EPUB 3.3 had become a W3C Recommendation, which the press release describes as an international web standard, and it stated that “any EPUB 3.2 document is also valid EPUB 3.3.”7
The same 2023 announcement lists what changed. It reports technical changes including “additional features to address bidirectional text” and “more precise specification of security related details for scripts,” and an editorial reorganization that separated the rules for content from the rules for reading software.8 It also records that “features that had little adoption (such as multiple rendition) have been removed from the standard text,” and that the EPUB Accessibility specification became part of the standard “for the first time in the history of EPUB.”9 On March 27, 2025, the W3C’s Publishing Maintenance Working Group published an updated EPUB 3.3 Recommendation, which it described as including “a number of minor changes, primarily to clarify some details on the conformance requirements of EPUB 3 documents.”10 As of November 2026, the version of the Recommendation on the W3C site is dated January 13, 2026.11
Two practical points follow from this history. First, the format a self-publisher produces today is, in almost every case, EPUB 3, and an EPUB 3 file written to the 3.2 rules remains valid. Second, the standard is maintained in public by a recognized standards body, and its documents are free to read. The Library of Congress, in its format description for EPUB 3.0, notes that EPUB was developed as an open standard under the IDPF and approved by ISO/IEC JTC1 as a Technical Specification (ISO/IEC TS 30135:2014), and its Recommended Formats Statement lists EPUB 3.0 as a preferred format for digital textual works.12
An EPUB file is a ZIP archive with a defined internal structure
The W3C’s overview of EPUB 3 describes “the single-file container format for EPUB” as one that “is based on the widely adopted ZIP format.”13 The Library of Congress format description makes the same point in its own terms: the Open Container Format “Specifies the mandatory container for an EPUB. OCF is based on the ZIP format.”14 An author can confirm this by copying an EPUB file, changing its extension to .zip, and opening it with any archive utility. What appears is a set of folders and files rather than a single opaque document.
The EPUB 3.3 Recommendation defines the result, an EPUB publication, as “A logical document entity consisting of a set of interrelated resources packaged in an EPUB container.”15 It requires that an EPUB publication “MUST be packaged in an EPUB container as defined in 4. Open Container Format (OCF).”16 Inside the container, a folder named META-INF holds a file called container.xml. The specification explains that “Key among these resources is the container.xml file, which directs reading systems to the available package documents.”17 A reading system, which is the specification’s term for any device or application that opens EPUB files, begins there: it reads container.xml, finds the path to the package document, and works outward from that file.
The container also holds a short file named mimetype that identifies the archive as an EPUB. The exact rules for that file (its position in the archive and the fact that it must not be compressed) are set out in section 4 of the Recommendation, and they are the reason that a hand-zipped EPUB often fails validation even when every other file is correct. Rezipping an unpacked EPUB with an ordinary compression tool can break those rules.
The package document describes the publication and fixes its reading order
The package document, commonly a file with the extension .opf, is the center of an EPUB. The Library of Congress description states that “an EPUB Publication includes a single XML-based Package Document.”18 The W3C overview says that “Each package document includes a dedicated metadata section for general information about the EPUB publication.”19 That metadata section is where the title, language, identifier, author names, and similar information live inside the file itself.
The EPUB 3.3 Recommendation names three required metadata elements in section 5.5.3.1: dc:identifier, dc:title, and dc:language.20 The dc: prefix indicates Dublin Core, a long-established vocabulary for describing resources. The identifier can be an ISBN, but it does not have to be; many conversion tools generate a unique identifier automatically. The Recommendation also contains a section on the last-modified date, recorded with a dcterms:modified property, which reading systems and validators use to tell versions of the same publication apart.21
Two further sections of the package document do structural work. The manifest is defined in the Recommendation as “the section of the package document that lists the publication resources,” which means every chapter file, image, font, and stylesheet in the book must appear in it.22 The spine is “the section of the package document that defines an ordered list” of content documents, and the specification states that this order “represents the default reading order of the EPUB publication.”23 The W3C overview describes the spine as providing “an external declarative means to explicitly specify navigation through a collection of documents.”24 In practice, the manifest says what is in the book, and the spine says in which order a reader moves through it.
This separation explains a common class of errors. A chapter can exist in the archive and yet never appear to the reader because it was left out of the spine, and an image can display in one application and be rejected by a validator because it was never declared in the manifest. Validators check precisely these correspondences; the EPUBCheck project lists “the consistency of internal references” among the things it examines.25
Content documents are web pages written in strict XML syntax
The readable text of an EPUB is stored in content documents. The W3C overview describes these as “XHTML or SVG documents that describe the readable content and reference associated media resources,” and notes that they “can reference CSS Style Sheets, allowing EPUB creators to define the desired rendering.”26 The 3.3 Recommendation adds that “XHTML content documents use the XML syntax defined in HTML.”27 An EPUB chapter is therefore a web page, styled with the same CSS used on websites, but written under XML’s stricter rules: every element must be closed, attribute values must be quoted, and named character entities that HTML tolerates may not be accepted.
This web lineage is deliberate. The W3C overview states that “just like the web, EPUB publications are built on hypertext,” and it describes the format’s design as declarative: content is meant to be handled as data that software can manipulate, not as programs to be executed.28 For an author, the consequence is that formatting in an EPUB is a set of suggestions to the reading system rather than a fixed page. The overview explains that for ordinary books “reading systems typically perform text line layout and pagination on the fly.”29 The reader’s choice of font size, margins, and theme can override many of the publisher’s styles, and the line breaks and page breaks that a reader sees are calculated by the device at the moment of reading.
The XML strictness shows up in error messages that self-publishers meet when uploading files. IngramSpark’s guide to common EPUB errors, for example, includes “The entity &xyz; was referenced, but not declared,” with the advice that “You need to change the referenced named entity to a numeric one,” and an error stating that “The lang and xml:lang attributes must have the same value.”30 Both are consequences of XHTML’s XML syntax, not of anything specific to books.
Navigation is a required part of every EPUB 3 publication
EPUB 3 requires a navigation document. The Recommendation states that an EPUB publication “MUST contain an EPUB navigation document that conforms to 7. EPUB navigation document,” and it defines that document as one that “contains human- and machine-readable global navigation information.”31 The W3C overview explains that the navigation document “uses the html nav element to define human- and machine-readable navigation information.”32
The navigation document is distinct from a table of contents page that an author might place at the front of the book. The visible table of contents is ordinary content, part of the reading order. The navigation document supplies the menu that the reading application offers in its own interface, and it allows assistive technology to move through the structure of the book. Older EPUB 2 files used a separate file format, the NCX, for this purpose; many current files contain both a navigation document and an NCX so that older reading systems can still find their way. That arrangement reflects the backward compatibility built into the standard; the Recommendation’s own discussion of media fallbacks uses EPUB 2 reading systems as its example of older software that does not recognize newer features.33
The format supports a defined set of images, audio, and fonts
EPUB does not accept every file type. The Recommendation defines a list of core media types, which publications “MAY include” without providing fallbacks.34 For images, the core media types listed in section 3.2 are image/gif, image/jpeg, image/png, image/svg+xml, and image/webp.35 Other formats are permitted only with a fallback to a core type, under rules the specification calls manifest fallbacks and intrinsic fallbacks.36 The specification also provides that XHTML and SVG documents can be placed in the spine directly: “EPUB creators can put XHTML and SVG core media type resources in the spine without any modification or fallback.”37
Beyond static content, the W3C overview describes media overlays, which “provide the ability to synchronize that audio with the text of a Content Document,” the mechanism behind read-aloud books in which spoken narration is highlighted word by word.38 The overview also states that “A major goal of EPUB is to facilitate content accessibility,” and that “The EPUB Working Group strongly recommends that EPUB creators ensure that they generate accessible content.”39
Reflowable and fixed layouts are two renditions of the same format
Most EPUBs are reflowable: the text flows to fit the screen and the reader’s chosen settings. EPUB also supports fixed layouts, in which each content document represents one page with a defined size. The W3C overview explains that “Page-precise layouts are required to meaningfully represent children’s books, comics and manga, magazines.”40 The 3.3 Recommendation refers to fixed-layout documents as those “designated pre-paginated in the package document, as defined in 8.2 Fixed layouts.”41 Because the choice between the two layouts affects design, accessibility, and retailer acceptance in different ways, it is treated separately in the companion article on reflowable and fixed-layout ebooks.
Retailers accept EPUB, but each sets its own narrower rules
The EPUB standard is open, but no retailer is obliged to support every feature it allows. As of November 2026, KDP’s help page on supported formats states: “We support books in EPUB format that meet the specifications outlined in the Kindle Publishing Guidelines,” and recommends checking files in Kindle Previewer before upload.42 The same page lists Word documents and Amazon’s own KPF format, produced by Kindle Create, as alternatives, and it states that “Effective March 2025, we will no longer accept MOBI files for fixed-layout eBooks.”43 Amazon converts uploaded files into its own formats for delivery, so the EPUB is an input to KDP rather than the file a Kindle reader receives.
Rakuten Kobo’s published EPUB specification takes a more direct approach. As of November 2026, it states that “The current version is EPUB 3.3 but Kobo still supports its predecessors, EPUB 3.2, 3.1, 3.0, and 2.0.1,” and it says that Kobo “does not accept .mobi, KF8, PDF or any format outside of EPUB.”44 It also recommends limits of “10 MB of embedded content/each HTML file in an ePub” and “1 GB/ePub.”45
Narrower retailer rules appear most clearly with images. The standard lists WebP and SVG among its core image types, and Kobo’s specification names “JPG, PNG, Scalable Vector Graphics (SVG), and WebP” as supported.4647 Apple’s Books Asset Guide, by contrast, asks for “JPEG with .jpg or .jpeg extension (quality unconstrained) or PNG with .png extension” for interior images, and recommends using the HTML img tag “instead of wrapping images in svg:image.”48 KDP’s reflowable image guidelines note that “Computer-generated visuals are best represented as Scalable Vector Graphics (SVG) however, SVG tags can lead to errors,” and recommend the HTML image tag instead.49 A file can therefore conform fully to EPUB 3.3 and still need adjustment for a particular storefront.
Conformance is tested by an official checker that retailers rely on
Because so many parts of an EPUB must agree with one another, conformance is tested by software. The W3C describes EPUBCheck as “the official conformance checker for EPUB publications” and states that it is “a project owned by W3C.”50 According to that page, EPUBCheck examines “the structure of the container,” “the package description file and associated metadata,” “the content markup,” and “the consistency of internal references,” and it states that “Most retailers will not accept an EPUB file unless it successfully passes EPUBCheck scrutiny.”51 IngramSpark states that it “uses EpubCheck during ePub content validation,” and Kobo writes that it “strongly recommends that only files that pass EPUBCheck without flags should be distributed.”5253
The checker has limits that the W3C itself states. EPUBCheck “will not detect typos, mispellings, off-topic images, etc.,” and the project page describes it as unable to play an editorial role.54 A valid EPUB is a well-formed EPUB, not necessarily a well-made book, and the process of validating and repairing files is covered in the companion article on EPUB validation.
What the format leaves to the reading system
The EPUB file format fixes the parts of a book that must be the same everywhere: what files it contains, what order they are read in, what the book is called, and how a reader navigates it. It deliberately leaves the final appearance of a reflowable book to the reading system and the reader. That division of labor is the source of EPUB’s portability, and it is also the source of most authors’ frustration with it, since the same file can look different on a Kobo, an iPad, and a phone.
For a self-publisher, the useful habit is to treat the EPUB as a structured document rather than a picture of pages. The structure (correct markup, a complete manifest, a sensible spine, a working navigation document, and accurate metadata) travels intact from one device to another. Visual details travel only as far as each reading system chooses to honor them, and the extent of that honoring is documented, imperfectly, in each retailer’s own guidelines rather than in the standard.
Related articles on selfpublishingtool.com
- Reflowable vs Fixed-Layout eBooks
- How to Validate an EPUB File
- How eBook Navigation and Tables of Contents Work
- Inside the EPUB Zip Archive: Unzipping an eBook to Fix Broken Code by Hand
- The Hidden Metadata Inside an EPUB’s content.opf File That Controls Discovery
- How to Prepare an eBook for Kindle Publication
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.