What is an EPUB file?
An EPUB (Electronic Publication) is the open standard format for ebooks. It was created by the IDPF and is now maintained under the W3C's EPUB specification, which makes it a vendor-neutral format rather than one company's proprietary container. Almost every ereader platform reads it, and most DRM-free ebooks sold or downloaded today ship as an .epub.
The first thing to know: an EPUB is a ZIP archive. Rename a .epub to .zip and your operating system will list the same folders and files you would find inside any other zip. The format is literally defined as a ZIP with a specific directory layout inside, and everything below follows from that fact.
What an EPUB really is: a ZIP with a required layout
An EPUB is a ZIP archive whose contents must follow a fixed structure. The spec enforces two signature rules that make the format identifiable and parseable.
The first entry in the ZIP must be a stored (uncompressed) file named mimetype, and its contents must be exactly the string application/epub+zip (20 bytes) with no trailing newline or extra bytes. Stored means the file is held uncompressed so a reader can read those bytes straight out of the archive without running the deflate step. That is how an ereader confirms the file really is an EPUB before it tries to render anything.
The rest of the book sits alongside it. META-INF/container.xml is a small XML file whose only job is to point at the package document — the OPF file — that describes the actual book. The book's content lives in a folder, conventionally OEBPS/ (the name is not required). Inside that folder you find content.opf (the OPF package document), the navigation file, the XHTML chapter files, and the supporting images, CSS, and embedded fonts.
mimetype— stored uncompressed, contents exactlyapplication/epub+zip. Must be the first entry.META-INF/container.xml— points to the location of the OPF package document.OEBPS/content.opf(the OPF) — the manifest of every file, the spine (the reading order of chapters), and the book's metadata (title, author, language, unique identifier).- The navigation file —
toc.ncxfor EPUB 2,nav.xhtmlfor EPUB 3. OEBPS/*.xhtml— the chapter content, written in XHTML so each chapter is essentially a small web page.- Images, CSS, and embedded fonts referenced by the chapters.
Inside the OPF: manifest, spine, and metadata
The OPF package document (commonly content.opf or package.opf) is the heart of the book. It has three sections that matter.
The metadata block holds the title, creator (author), language, publisher, and a unique identifier (usually an ISBN or a generated UUID) that the spec requires every EPUB to carry. The manifest is a flat list of every single file in the book — every XHTML chapter, every image, the CSS, the fonts, the navigation file — each given an id and a media type. Nothing in the book exists outside the manifest. The spine is an ordered list of manifest ids that defines reading order: the sequence in which a reader turns the pages. A file can be in the manifest but not in the spine, meaning it is bundled but not part of the linear reading flow — a common place for cover images or optional appendices.
- metadata: title, author, language, publisher, unique identifier.
- manifest: every file in the book, each with an id and media type.
- spine: the ordered reading sequence, referencing manifest ids.
Why EPUB reflows and PDF does not
EPUB is a reflowable format. The chapters are XHTML, so the text flows to fit whatever screen and font size the reader has chosen — a phone, a 7-inch ereader, a tablet, or a desktop. Bump the font size and the line breaks move; rotate the device and the page re-paginates. That is the central difference from PDF, which stores a fixed layout: a PDF page is an exact, positioned rendering meant to look identical everywhere, including its line breaks and page breaks. PDF is good for things where layout is the message (a printed form, a typeset magazine, a slide deck); EPUB is good for prose that should adapt to the reader.
How to open an EPUB
There are two different things people mean by open an EPUB, and the right tool depends on which one you want.
Read the book. Use an ereader app: Apple Books on macOS and iOS, Google Play Books on Android, Thorium Reader on Windows, or Calibre (which is also a full library manager and format converter). These render the XHTML chapters, apply the CSS, and give you the paginated reading experience with adjustable fonts. Browser extensions exist too if you want to read inside the browser.
Inspect the internals. Because an EPUB is a ZIP, you do not need an ereader to look inside it — you can open it as an archive and read the raw files. That is useful for checking what metadata an ebook actually carries, viewing the cover image and embedded artwork, reading the raw XHTML of a chapter, or debugging why a book renders oddly in one reader but not another. An in-browser viewer like ZipTool does this directly: drop the .epub on the page (or load it from a URL) and the file tree appears — OEBPS/, META-INF/, the OPF, the XHTML chapters — all parsed locally in your browser, with the contents never uploaded to a server.
One caveat on safety: client-side parsing means your file is not uploaded, which is a real privacy win for confidential books (NDA material, legal docs, client work). It does not mean opening an untrusted file is risk-free — parsing still runs JavaScript in your browser tab. Treat a suspicious .epub the way you would treat any file from an untrusted source.
- Open ZipTool in a modern browser (Chrome, Firefox, Safari, Edge).
- Drag the .epub onto the page, pick it with the file selector, or load it from a URL.
- Expand
OEBPS/(or the book folder) to seecontent.opf, the navigation file, and the chapter XHTML files. - Click any
.xhtmlchapter to read it as syntax-highlighted markup; click the cover or interior images to view them directly; opencontent.opfto read the manifest, spine, and metadata. - Everything runs locally — the file is parsed in your browser tab and never sent to a server.
EPUB 2 versus EPUB 3
EPUB 2 is the older version and still the most widely distributed across back catalogs. Its navigation is toc.ncx, modeled on the DAISY talking-book standard. EPUB 3 is the current specification and adds several things EPUB 2 lacked: a richer HTML-based navigation document (nav.xhtml) that supports nested lists and page-list navigation; media overlays for synchronized audio narration (useful for read-aloud and accessibility); fixed-layout pages so a book can pin an exact page geometry when reflow is wrong (children's picture books, comics, textbooks); and limited, sandboxed scripting support. Most newly produced books are EPUB 3, large back catalogs remain EPUB 2, and any modern reader handles both.
- EPUB 2:
toc.ncxnavigation, the baseline that every reader supports. - EPUB 3:
nav.xhtmlnavigation, media overlays (synced audio), fixed-layout pages, limited scripting.
Why an EPUB might not open: DRM
If an .epub will not open in a plain viewer, or you cannot read its chapters as XHTML, the usual reason is DRM (Digital Rights Management). Many ebooks bought from commercial stores are wrapped in Adobe DRM (also called Adobe ADEPT) or a comparable scheme: the file is still a ZIP, still has the mimetype entry, but the chapter contents are encrypted, and only a reader with the right license key can decrypt them. A plain in-browser viewer will see the OPF and the file list fine but will show the chapter XHTML as unreadable encrypted bytes. DRM-protected EPUBs are not broken — they are deliberately locked — and there is no legitimate way around that lock in a generic viewer. If you bought it, open it in the reader app or platform the seller specifies (Adobe Digital Editions, the retailer's own app, or an authorized device). For a deeper comparison of which ZIP-based containers open where, see the archive formats overview.
Frequently asked questions
What is an EPUB file?
An EPUB (Electronic Publication) is the open standard format for ebooks, now maintained under the W3C's EPUB specification. Structurally it is a ZIP archive with a required internal layout: a stored, uncompressed mimetype file containing exactly application/epub+zip, a META-INF/container.xml that points to the OPF package document, and a content folder (commonly OEBPS/) holding the OPF (manifest, spine, metadata), a navigation file, XHTML chapters, images, CSS, and fonts. Because the chapters are XHTML, the text reflows to fit any screen and font size.
Is an EPUB just a zip?
Yes. An EPUB is literally a ZIP archive — rename a .epub to .zip and your OS will list its contents. The difference from an arbitrary zip is that the EPUB spec mandates a specific structure: the first entry must be a stored (uncompressed) file named mimetype containing exactly application/epub+zip, then META-INF/container.xml pointing to the OPF, then the book folder with the OPF, navigation, and XHTML chapters. Any tool that reads ZIP can open the container; an ereader is what turns those XHTML chapters into a paginated book.
How do I open an EPUB file?
It depends on whether you want to read it or inspect it. To read it, use an ereader app such as Apple Books, Calibre, Thorium Reader, or Google Play Books — these render the chapters, apply the CSS, and let you adjust font size. To inspect the internals — read the metadata in the OPF, view the cover and images, or read a chapter's raw XHTML — open it as a ZIP in an in-browser viewer like ZipTool: drop the .epub on the page and browse the OEBPS/ folder, the OPF, and the chapter files directly, with the contents parsed locally and never uploaded.
What is the difference between EPUB and PDF?
EPUB is reflowable: its chapters are XHTML, so text reflows to fit the screen and font size you choose, and pages re-paginate when you rotate the device or change the type. PDF is a fixed layout: each page is an exact, positioned rendering meant to look identical everywhere, with line and page breaks baked in. EPUB suits prose that should adapt to the reader; PDF suits documents where the layout itself matters (forms, typeset pages, slide decks).
Why won't my EPUB file open? (DRM)
The most common reason a .epub won't open in a plain viewer — or whose chapters show as unreadable bytes instead of XHTML — is DRM. Many store-bought ebooks are wrapped in Adobe DRM (ADEPT) or a similar scheme: the file is still a ZIP with the right mimetype, but the chapter contents are encrypted and only a reader holding the license key can decrypt them. A generic viewer can list the files but cannot show the chapters. DRM-protected EPUBs are not corrupt; they are deliberately locked. Open them in the reader app or platform the seller specifies, such as Adobe Digital Editions or the retailer's own app.
Can I read an EPUB's chapters without an ereader app?
Yes. Since an EPUB is a ZIP and the chapters are plain XHTML, you can open it in any ZIP viewer and read the raw .xhtml files directly. An in-browser viewer like ZipTool parses the .epub locally (no upload, no ereader install), shows the file tree, and lets you open each chapter as syntax-highlighted markup, view the cover and embedded images, and read the metadata in the OPF. You lose the paginated, styled reading experience an ereader gives you, but you gain a direct look at exactly what is inside the book.