Chapters · 3
EPUB Validator
Ready
Check and fix an EPUB
Checked and repaired on your device. The file is never uploaded.
An EPUB validator checks that an ebook follows the rules reading apps and stores expect. Drop your .epub into the tool above: it checks the package, the metadata, the manifest, the reading order, the table of contents and the XHTML of every chapter, fixes what it can, and gives you the fixed book to download. It runs in your browser, so your manuscript never leaves your computer.
The chapters below list exactly what it checks, how it compares with EPUBCheck, and what to do after a fix.
01
What the validator checks
An EPUB is a ZIP archive with a fixed layout inside. The tool reads it the way a reading app does and checks each layer.
The package
- The
mimetypefile: present, first in the archive, uncompressed and containing exactlyapplication/epub+zip. META-INF/container.xml: present, readable, and pointing to a package file (.opf) that exists.- A damaged archive: a missing file index or a book cut short during a download. Everything up to the cut is kept.
Metadata
- A title, a language and an identifier, and a
unique-identifierthat points to that identifier. - For EPUB 3, a last-modified date in the required format.
When one is missing, the tool adds a sensible value: the first heading as the title, en as the language, a new identifier. Check these in the fixed book and change them if they're wrong.
Manifest, reading order and table of contents
- Files listed in the manifest that aren't in the book, and files in the book that the manifest leaves out.
- Wrong or missing media types, including old font types such as
application/x-font-ttf. - Duplicate ids and files listed twice.
- A reading order that points to unknown items, or is empty.
- For EPUB 3, a missing navigation document. The tool builds one from the reading order.
Chapters
- XHTML that isn't well-formed: tags left open, a stray &, characters XML forbids.
- HTML habits XHTML doesn't allow, such as
or a line break tag that isn't closed. - Images and stylesheets the chapter links to but the book doesn't contain.
Protected books
Books with DRM are reported and left alone. We don't remove DRM.
If it doesn't work
- The tool says the book has no readable chapters: the content files are missing or unreadable. Export the book again from the app you wrote it in.
- The fixed book opens, but the title is "Untitled": the original had no title. Set it in your writing app, or edit the
dc:titleline in the package file.
02
This validator and EPUBCheck
EPUBCheck is the official EPUB conformance checker, maintained under the W3C. It runs on Java and checks the whole specification. This tool is not EPUBCheck: it runs its own checks in your browser, covers the structural errors that most often stop a book from opening or uploading, and fixes them instead of only listing them.
Matching EPUBCheck messages
If EPUBCheck or a store gave you an error code, these are the ones the tool fixes:
- PKG-006: the mimetype file is missing or not first.
- PKG-007: the mimetype file has the wrong content.
- RSC-002:
META-INF/container.xmlis missing. - OPF-002: the package file isn't where
container.xmlsays. - RSC-005 and RSC-016: a file couldn't be parsed, usually broken XML or a missing required element.
- RSC-007 and RSC-001: a referenced file isn't in the book.
- OPF-003: a file is in the book but not in the manifest.
- OPF-013: a file's media type doesn't match its content.
- OPF-030: the unique-identifier points to no identifier.
- OPF-049: the reading order points to an unknown item.
- OPF-074: one file is listed in the manifest more than once.
What it doesn't check
CSS, accessibility, fixed-layout rules, scripts, links between chapters, and EPUB 2 books without an NCX table of contents. Before you publish, run the fixed book through EPUBCheck or the store's own previewer as a final check.
03
After the fix
- Open the fixed .epub in a reading app and page through it.
- Check the table of contents. If the tool built one, it lists the chapters in reading order with their first heading as the title.
- Check the title, author and language the store will show.
- Upload it, or send it to your reading device.
If a store still refuses the book, see kindle rejecting epub for Kindle and KDP, or run EPUBCheck to see the remaining errors.
Fix the file now
Drop the document into the repair tool at the top of this page. It's free, and the file stays on your device.
Troubleshooting
The tool says the file is not an EPUB
It reads the file's first bytes, not its name. A file that ends in .epub can be a ZIP of something else, a PDF or a web page. Export the book again from your writing app.
My book is larger than 50 MB
The free check takes files up to 50 MB. Large books are usually large because of images: compress them in your writing app and export again.
Questions
Frequently asked questions
Is this EPUBCheck?
No. It runs its own checks in your browser and fixes what it finds. EPUBCheck is the official, complete checker; use it as a final check before you publish.
Is the EPUB validator free?
Yes. Books up to 50 MB are checked and fixed free, with no account.
Is my manuscript uploaded?
No. The check and the fix run in your browser, and the book stays on your computer.
Does it work with EPUB 2?
Yes. It checks EPUB 2 and EPUB 3 books. A navigation document is only added to EPUB 3 books, because EPUB 2 uses an NCX table of contents instead.
Will it change my text?
Only where the text breaks XML: a stray & is written as a code, and characters XML forbids are removed. Everything else stays as it was, and every change is listed.