An EPUB file that won't open in Books on a Mac
An EPUB is a ZIP archive with a particular layout inside it. When Books on a Mac refuses one, or imports it and shows a blank book, the cause is almost always one of four things: the file is copy protected by a store other than Apple’s, the download never finished, the file is not really an EPUB despite its name, or the archive inside is damaged. Each has a quick test, and only the last one needs a repair.
How to add an EPUB to Books properly
Before diagnosing anything, rule out the import itself. Books on a Mac does not always open an EPUB you double-click in the way you expect, particularly if another app has claimed the extension.
- Open Books.
- Choose File > Add to Library, then pick the file. Dragging the file onto the Books window works too.
- Look for it under Library, not Book Store.
If it appears in the library and opens, you are done. If Books reports a problem, or the book opens to empty pages, keep reading.
Is it copy protected
Ebooks bought from other stores are often wrapped in copy protection tied to that store’s own reading app. Books cannot open those files, and nothing on your Mac will change that; the file is not broken, it is locked to a different app. Manatee does not remove copy protection either.
The tell is where the file came from. A book downloaded from a store account, and opened through that store’s software, is very likely protected. Free public domain books, files from an author’s own site and most technical publishers’ downloads usually are not.
For a technical check, open Terminal and list what is inside:
unzip -l ~/Downloads/book.epub
A file named META-INF/encryption.xml suggests some content is encrypted. It is not conclusive, because some unprotected books use the same file to obscure embedded fonts only. If the book’s text files are listed and it still will not open, protection is the likely reason; if only fonts are affected, the text should still display.
Did the download finish
A partial download is the most common cause of an EPUB that fails without explanation. Compare the size in Finder’s Get Info with the size the website listed. Then test the archive:
unzip -t ~/Downloads/book.epub
This reads every entry and checks it. A healthy file ends with a line saying no errors were detected. Errors near the end of the list, or a message that the end of the archive cannot be found, mean the file was cut off. Download it again; that is the real fix, and it takes less time than any repair.
Is it actually an EPUB
Extensions can lie. A file renamed to .epub might be a different ebook format, a PDF, or a web page saved by mistake when a download link redirected. Check with:
file ~/Downloads/book.epub
The output should describe an EPUB document or a Zip archive. If it says PDF, rename the extension to .pdf and open it in Preview. If it says HTML, the download saved an error page instead of the book; open it in a text editor and you will usually see a message from the website. If it names another ebook format, Books cannot read it and it needs converting in a tool that supports that format.
A related case: an EPUB that shows up as a folder. Some download methods unpack the archive on arrival. The folder contains the book, but Books wants the single file. You can rebuild it with the steps in the next section.
Rebuilding an EPUB by hand
The EPUB format has one strict rule that trips up hand-made or re-zipped files: the first entry in the archive must be an uncompressed file called mimetype. A book that was unzipped and re-zipped with the Finder’s Compress command breaks that rule, and Books may reject it even though every page is intact.
To rebuild one correctly, unzip it (or open the unpacked folder) in Terminal, then run these two commands from inside that folder:
zip -X0 ../rebuilt.epub mimetype
zip -rX9 ../rebuilt.epub * -x mimetype
The first command adds mimetype first with no compression. The second adds everything else. Add rebuilt.epub to Books with File > Add to Library. This fixes books with a bad layout; it does not fix entries whose data is damaged, because zip will copy the damage along with everything else.
When the archive is damaged
If unzip -t reports errors on specific files in the middle of the list and there is no way to download the book again, the question is how much can be saved. Because an EPUB stores each chapter as a separate file, damage to one entry does not have to take the whole book with it.
Manatee handles this as container repair. Drop the EPUB onto the menu bar icon or the window, or right-click it in the Finder and choose Services > Fix with Manatee. It reads the entries that survive and writes a new, correctly structured EPUB next to the original, which it leaves untouched. The outcome is reported as Fixed, Partial or Not fixable, so you know whether you have the whole book or most of it. A Partial result might mean a chapter or an image is missing; the chapters it recovered are complete.
The same approach applies to other ZIP-based files, including DOCX, XLSX and PPTX documents, and plain ZIP archives; how to fix a corrupted ZIP archive covers the general case. Manatee works offline on your Mac with no account, and every feature is free for 24 hours.
If nothing works
If the file is protected, go back to the app of the store you bought it from. If it is damaged beyond repair, the seller or library you got it from can almost always provide a fresh download, which is better than any recovered copy. For a file with no obvious origin, the file someone sent you won’t open is a useful general checklist.
Questions
Can I open an EPUB on a Mac without Books? Books is the reader built into macOS. Because an EPUB is a set of web pages in a ZIP, you can unzip it and open the chapter files in Safari to read the text, although navigation and styling will be rough.
Why does Books show the cover but no pages?
Usually a missing or damaged chapter file, or a table of contents that points at files that are not there. Run unzip -t to see which entries fail.
Does renaming a ZIP to EPUB make it an EPUB?
Only if the contents follow the EPUB layout, including the uncompressed mimetype entry first. Renaming alone changes the name, not the structure.