EPUB File
Definition
EPUB is maintained by the W3C, which published EPUB 3.3 as a Recommendation in May 2023. The container is an ordinary ZIP archive, and inside it the content is ordinary web technology: each chapter is an XHTML document, styled with CSS, with an OPF package file listing every resource and a navigation document providing the table of contents. Two details are unusual. The archive must contain a file named mimetype as its very first entry, stored uncompressed, holding the exact string application/epub+zip — that is how a reader identifies the format from the first bytes without unzipping anything. And because chapters are XHTML rather than HTML, they must be well formed: an unclosed tag is an error, not something the reader repairs. Reflowable text is the default, though fixed-layout EPUB exists for picture books and comics, where the page is a fixed canvas like a PDF.
Why It Matters
The choice between EPUB and PDF is really a choice about whose device decides the layout. A PDF fixes the page, which is right for a form or a report with precise typesetting and wrong for 80,000 words read on a phone, where the reader spends the whole book pinching and panning. An EPUB reflows, so a person who needs 24-point text gets 24-point text and simply reads more pages. It is also the more accessible format by default, since the content is marked-up web content with real headings a screen reader can navigate rather than positioned glyphs needing tags added later. The trade-off is reach: browsers have no EPUB viewer, so a link downloads and the reader needs an application such as Apple Books, Kobo or Calibre.
How It Works
Served with Content-Type: application/epub+zip, an EPUB downloads and is handed to whatever the device has registered — on iOS and macOS that is Apple Books, which opens it directly from the downloads sheet. The reading application unzips the archive, reads the OPF package for the spine order, and renders each XHTML chapter through an embedded browser engine, applying its own stylesheet over yours for margins and theme. Fonts can be embedded in the archive and referenced with @font-face exactly as on a web page. A static host builds and validates none of this: you create the file with Calibre, Sigil or Pandoc, and EPUBCheck tells you whether it conforms before you publish.
Real-World Example
A self-published author offers a 1.8 MB novel at goodbooks.99helpers.site/nightfall.epub, with a 2.4 MB PDF beside it for readers who want fixed pages. Both are static files on 99helpers, served with their correct types, so the EPUB opens straight into Apple Books on an iPhone while the PDF opens in the browser. The download analytics settle an argument the author had been having with a friend: the EPUB outpulls the PDF by roughly four to one. When a typo in chapter nine is fixed, the corrected file replaces the old one at the same address.
Common Mistakes
- ✕Rebuilding the archive with an ordinary ZIP tool — the mimetype entry ends up compressed or out of order, and strict readers reject the book outright
- ✕Serving it as application/zip — the browser saves it with a .zip extension and the reading application never gets a chance to claim it
- ✕Writing chapters as loose HTML — EPUB content is XHTML, and an unclosed paragraph tag that a browser would forgive is a validation failure here
- ✕Skipping EPUBCheck before publishing — Apple Books and Kobo both run their own validation at ingest, and an error that is cheap to fix now blocks the listing later
Related Terms
ZIP Archive
A single .zip file that holds many files and folders, each compressed separately. On a host it is used two ways: served as one download, or unpacked on upload so its contents are served individually.
PDF File
A PDF is a fixed-layout document: the page carries its own fonts, images and exact coordinates, so it looks identical on every screen and printer. Browsers open one in a built-in viewer rather than saving it to disk.
HTML File
An HTML file is the source of a web page: nested elements that describe headings, paragraphs, links, images and forms. It is the one format a browser executes rather than merely displays — it fetches what the file references and runs the scripts it names.
Document Hosting
Publishing office documents — .docx, .xlsx, .pptx, .csv, .rtf — at web addresses. No browser can draw these formats, so a correct response ends in a clean download with the right file name.
Web Font
A web font is a typeface downloaded by the browser as part of the page, so the text renders in your chosen face rather than whatever the reader's device happens to have. It is an extra file on the critical path, and it decides whether text appears immediately or after a pause.
Put a file online in seconds
Drop in a document, an image, a page or a whole static website and share the link — free, with no build step and no server to set up.
Host a file free →