← toolkit.bot

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?

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:

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-074Missing required element in OPFAdd dc:title, dc:language, dc:identifier
RSC-007File referenced in manifest not foundCheck file paths; case-sensitive on Linux
HTM-055Deprecated HTML element (e.g. <b> for headings)Replace with semantic HTML (strong, em, h1)
NAV-003Missing or empty NAV document TOCAdd nav[epub:type=toc] with entries
CSS-017CSS property not allowed in EPUBRemove 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:

Tool 3: Online Validators (No Install)

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 →

Related guides