# What is the EPUB container (OCF)?

Source: https://epublab.com/glossary/ocf-container/ (updated 2026-11-03)

An EPUB file is a ZIP archive laid out by the Open Container Format (OCF): an uncompressed "mimetype" file first, a META-INF/container.xml that points to the package document, and the content files. Renaming a .epub to .zip lets you look inside.

## Why it matters when you convert a PDF to EPUB

Most "broken EPUB" reports from validators start here: a mimetype file that is compressed, not first, or followed by a newline, or a container.xml that points to the wrong path. A converter has to write the archive in exactly this order, which is why zipping a folder by hand often produces an EPUB that some readers refuse.

EPUBCheck reports container problems with PKG messages (for example PKG-006 and PKG-007 for the mimetype file) and RSC-002 or RSC-003 when container.xml is missing or incomplete.
