How to Validate an EPUB — EPUBCheck, Ace by DAISY, and Online Validators
EPUB validation catches structural errors that cause rejection on KDP, Apple Books, and Kobo, and flags accessibility issues before distribution. Here's how to validate with the right tools.
Why Validate Your EPUB?
- Publishing platforms reject invalid EPUBs: Amazon KDP, Apple Books Connect, and Kobo Writing Life all run validation on upload. EPUBs that fail EPUBCheck are rejected outright.
- Catch rendering bugs early: Missing manifest entries, broken internal links, and malformed CSS cause display problems on specific readers.
- Accessibility compliance: The European Accessibility Act (EAA) 2025 requires accessible EPUBs for publishers in the EU. The Ace checker tests for WCAG conformance.
Tool 1: EPUBCheck (Official W3C Validator)
EPUBCheck is the official EPUB specification validator, maintained by the W3C. It checks structural compliance against the EPUB 2 and EPUB 3 specs.
Install and Run
# Download EPUBCheck from GitHub (requires Java)
# https://github.com/w3c/epubcheck/releases
# Run against your EPUB
java -jar epubcheck.jar book.epub
EPUBCheck outputs:
- Errors — spec violations that will cause reader/platform failures. Must fix before publishing.
- Warnings — best-practice violations. Fix these before KDP and Apple Books submission.
- Infos — informational notes. Can usually ignore.
For JSON output (useful for CI pipelines):
java -jar epubcheck.jar book.epub --json report.json
Common EPUBCheck Errors and Fixes
| Error | Cause | Fix |
|---|---|---|
OPF-074 | Missing required element in OPF | Add dc:title, dc:language, dc:identifier |
RSC-007 | File referenced in manifest not found | Check file paths; case-sensitive on Linux |
HTM-055 | Deprecated HTML element (e.g. <b> for headings) | Replace with semantic HTML (strong, em, h1) |
NAV-003 | Missing or empty NAV document TOC | Add nav[epub:type=toc] with entries |
CSS-017 | CSS property not allowed in EPUB | Remove position:fixed, viewport units |
Tool 2: Ace by DAISY (Accessibility Checker)
Ace by DAISY checks EPUB 3 accessibility against WCAG 2.1 and the EPUB Accessibility specification:
# Install Ace (requires Node.js)
npm install -g @daisy/ace
# Run accessibility check
ace book.epub --outdir ./ace-report
Ace generates an HTML report in the output directory. Open ace-report/report.html in a browser. Key checks:
- Images have
alttext - Heading hierarchy is logical (no skipped levels)
- Language declared in the OPF and HTML
langattribute - Tables have headers (
<th>) - Color contrast meets WCAG AA (4.5:1 ratio)
Tool 3: Online Validators (No Install)
- EPUB Validator (validator.idpf.org): The original online EPUBCheck interface. Upload your .epub for instant validation. Uses EPUBCheck 4.x.
- Kindle Previewer: Amazon's tool validates KDP-specific requirements beyond what EPUBCheck covers. Download from kdp.amazon.com/tools.
- Apple Books Automator (Transporter): Apple's submission tool runs validation before upload. Available via the Apple Books Connect dashboard.
Validating in a CI Pipeline
For automated validation on every build:
# GitHub Actions example
- name: Validate EPUB
run: |
java -jar epubcheck.jar book.epub --json report.json
# Fail the build if errors exist
python3 -c "
import json, sys
r = json.load(open('report.json'))
errors = [m for m in r['messages'] if m['severity'] == 'ERROR']
if errors:
for e in errors: print(e)
sys.exit(1)
print('EPUB valid')
"
toolkit.bot generates EPUBCheck-valid EPUBs from PDF. No manual validation step needed.
Convert PDF to EPUB →