What Is an EPUB File?
EPUB (Electronic Publication) is a ZIP file with a specific internal structure: XHTML chapters, CSS stylesheets, images, and a set of XML manifest files that tell reading apps how to assemble them into a book. It's an open standard maintained by the W3C — the same organization behind HTML and CSS. If you're comfortable with web development, the internals are immediately familiar.
What's Actually Inside the ZIP
Rename a .epub file to .zip and extract it. You'll find:
- XHTML files — the book's text content, typically one file per chapter. Standard HTML with an XHTML doctype.
- CSS stylesheets — typography, spacing, colors. Reading apps apply these to render the content.
- Images — cover art, inline illustrations (JPEG, PNG, SVG, GIF; WebP supported in EPUB 3).
- content.opf (or package.opf) — the manifest. Lists every file in the book, defines the reading order (spine), and stores all metadata: title, author, language, publisher, date, ISBN.
- nav.xhtml (EPUB 3) or toc.ncx (EPUB 2) — the navigation document. Reading apps use this to build the chapter list and let readers jump between sections.
- mimetype — a single-line file containing
application/epub+zip. Must be the first, uncompressed file in the ZIP. Reading apps use this to identify the format before parsing anything else.
The metadata in the OPF file is what controls how your book appears in reading app libraries: the title shown on your Kobo home screen, the author used for alphabetical sorting, the language used to select a hyphenation dictionary. Broken or missing metadata is why books show up as "Unknown Author" — fix it with the metadata editor.
EPUB 2 vs EPUB 3
EPUB 2 (2007) is the older version: text, images, basic TOC. Still widely supported and most non-fiction and fiction books work fine with it.
EPUB 3 (2011, current version EPUB 3.3) adds the features that matter for richer content:
- Media overlays — read-aloud audio synchronized with highlighted text
- JavaScript interactivity (for enhanced ebooks and educational content)
- Vertical text layout — required for proper CJK (Chinese, Japanese, Korean) rendering
- MathML — mathematical equations without images
- Fixed-layout support — picture books, manga, comics where precise positioning matters
- Better accessibility: ARIA roles, semantic inflection, structured navigation
Most ebooks published after 2015 use EPUB 3. Run any file through the EPUB validator to see which version it uses and whether it has structural errors.
Why EPUB, Not PDF
The fundamental difference: EPUB text reflows to fit any screen. There are no pages — content adapts to width, font size, and device. PDF text is positioned at fixed coordinates on a fixed page size, which makes it ideal for printing and terrible for reading on phones. For anything text-heavy intended to be read on a device, EPUB is the right format. Full breakdown: EPUB vs PDF comparison.
EPUB and Kindle
Kindle doesn't open raw EPUB files from USB, but since 2022 Amazon accepts EPUB via their Send to Kindle email service and converts it automatically to their KFX format. MOBI — the format Kindle used for years — was deprecated in 2023. See EPUB vs MOBI and the EPUB to Kindle guide.
Tools
- Merge EPUBs — combine multiple files
- Split EPUB — extract chapters
- Compress EPUB — optimize images and ZIP
- EPUB to PDF — for printing or universal sharing
- PDF to EPUB — for reading on devices
- Edit metadata — fix title, author, cover
- Validate EPUB — run epubcheck
- Read online — view in browser
Related Guides
Try it now — free
Check your EPUB for errors, compatibility issues, and compliance. Free EPUB validator supporting EPUB 2 and EPUB 3 standards.
Validate EPUB Files →