Skip to content
EPUBCheck · Package and ZIP container

EPUBCheck PKG-003: unreadable EPUB file header

Updated:

EPUBCheck PKG-003 is an error message: “Unable to read EPUB file header. This is likely a corrupted EPUB file.” EPUBCheck could not read the start of the file as a ZIP archive, so it is not a usable EPUB. Every EPUB is a ZIP container, and reading apps and stores reject a file whose header is not a valid ZIP header.

The official message

Unable to read EPUB file header. This is likely a corrupted EPUB file.

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

Typical causes

  • The file is not really an EPUB: a PDF, MOBI or other file renamed to .epub.
  • The download or copy was cut short and the file is truncated.
  • An HTML error page or a login page was saved with the .epub name instead of the book.

How to fix it

  1. Download or export the EPUB again and compare its size with the original.
  2. Rename a copy to .zip and try to open it: if no ZIP tool can, the file has to be rebuilt from its source.
  3. If the file is another format renamed to .epub, convert it properly instead of renaming it.
  4. Run EPUBCheck again on the rebuilt file and fix any message that appears next: a damaged archive can hide other problems until it can be read.

When it's not this

If the ZIP opens but its directory is damaged, EPUBCheck reports PKG-004; if the path itself is wrong, PKG-018.

Terms used here

Other PKG messages

  • PKG-004 Corrupted EPUB ZIP header.
  • PKG-001 Validating the EPUB against version … but detected version ….
  • PKG-005 The mimetype file has an extra field of length …. The use of the extra field feature of the ZIP format is not permitted for the mimetype file.
  • PKG-006 Mimetype file entry is missing or is not the first file in the archive.
  • PKG-007 The content of the mimetype file must be the string "application/epub+zip"…
  • PKG-008 Unable to read file "…".

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck PKG-003 mean?

EPUBCheck PKG-003 is an error message: “Unable to read EPUB file header. This is likely a corrupted EPUB file.” EPUBCheck could not read the start of the file as a ZIP archive, so it is not a usable EPUB. Every EPUB is a ZIP container, and reading apps and stores reject a file whose header is not a valid ZIP header.

Is PKG-003 an error?

PKG-003 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.

PDF to EPUB tools

Every tool uses the same engine and starts with a free 5-page sample.