EPUB samples: a validation and repair lab
A passing check is useful only if you know what it checked. Start with a small original EPUB, change one thing, and compare the reports. These 9 files are free to download, reuse and modify.
Choose the control for reading and conversion. The other files are deliberately faulty teaching examples. Do not publish them as finished books.
Download the complete labBrowse individual files
Original text and artwork · CC0 reuse · No account required
Try one fault at a time
- Download the valid control. Open it in your reader, or use it to try a conversion without uploading a personal book.
- Pick one faulty variant and inspect its source change below.
- Compare EPUBCheck 5.4.0 with the Epublys structural checker. Start with Deep scan enabled and Auto-fix off so you can read the input diagnostics.
- Optionally run the file again with Auto-fix on. When a repair is available, the online tool returns that EPUB instead of the input report. Inspect and recheck the output. Each online run uses the normal allowance; downloading the recorded examples below does not.
The sample files
Results below describe these exact bytes. Each file after the control intentionally breaks a format rule. EPUBCheck and Epublys are measured separately: a checker can miss a deliberate fault. The raw results manifest includes diagnostic locations, the lighter ZIP check, repair outcomes and file hashes.
| Sample | EPUBCheck 5.4.0 | Epublys structural scan |
|---|---|---|
| Complete two-chapter EPUB | No error reported | No error reported |
| Wrong mimetype text | Errors | Error reported |
| Mimetype is not first | Errors | Error reported |
| Missing package language | Errors | Warning reported |
| Missing container.xml | Errors | Error reported |
| Missing chapter file | Errors | Error reported |
| Broken image reference | Errors | Warning reported |
| Duplicate ID inside one chapter | Errors | Fault not detected |
| Compressed mimetype only | No error reported | Fault not detected |
CONTROL FILE
Complete two-chapter EPUB
Original prose, navigation, linked chapters and an SVG diagram; no deliberate fault.
- EPUBCheck 5.4.0
- No error reported
- Epublys structural check
- No error reported
- Automatic repair
- No repair needed
Download valid sample3,269 bytes · EPUB
Source change, diagnostics and checksum
This is the unchanged control. Start here before trying the faulty variants.
EPUBCheck output
No diagnostic messages.
Epublys output before repair
valid: true; fixCount: 0. A true structural verdict is not proof of EPUB conformance.
No warnings or errors reported by this structural scan.
Input SHA-256: 7dc8def3275e27dd212a9d71ccfa95744066335ce5d7c32c99427e6da6703133
INTENTIONAL FAULT
Wrong mimetype text
The first uncompressed mimetype entry has the wrong value.
- EPUBCheck 5.4.0
- Reports errors
- Epublys structural check
- Error reported
- Automatic repair
- A repaired copy is available below
Download faulty sample3,259 bytes · EPUB
Source change, diagnostics and checksum
Changed location: mimetype. One intentional change can produce several diagnostic messages.
Before
application/epub+zipAfter
text/plain
EPUBCheck output
PKG-007(ERROR): The content of the mimetype file must be the string "application/epub+zip"
Epublys output before repair
valid: false; fixCount: 1. A true structural verdict is not proof of EPUB conformance.
- error: Invalid mimetype: "text/plain"
Recorded repair
Download the repaired EPUB (3,269 bytes). EPUBCheck 5.4.0 passes this repaired copy.
Repair SHA-256: 7dc8def3275e27dd212a9d71ccfa95744066335ce5d7c32c99427e6da6703133
Input SHA-256: 774cbd47acb74912933abaeca2f1ddd165daf73c927582f252769759c81d490d
INTENTIONAL FAULT
Mimetype is not first
The correct uncompressed mimetype entry is moved to the end of the ZIP.
- EPUBCheck 5.4.0
- Reports errors
- Epublys structural check
- Error reported
- Automatic repair
- A repaired copy is available below
Download faulty sample3,269 bytes · EPUB
Source change, diagnostics and checksum
Changed location: mimetype. One intentional change can produce several diagnostic messages.
Before
first ZIP entryAfter
last ZIP entry
EPUBCheck output
PKG-006(ERROR): Mimetype file entry is missing or is not the first file in the archive.
Epublys output before repair
valid: false; fixCount: 1. A true structural verdict is not proof of EPUB conformance.
- error: Misplaced mimetype file: it must be the first entry in the archive
Recorded repair
Download the repaired EPUB (3,451 bytes). EPUBCheck 5.4.0 passes this repaired copy.
Repair SHA-256: bfebf07ba40eeef3309c5d8f5598ba12bc6fd9fadd2c9f4c97fb86bce08b4852
Input SHA-256: 700c943bda93da96e9818e04b8a7942ece61caf7aa3a33d44f67c61a1142fb88
INTENTIONAL FAULT
Missing package language
Only dc:language is removed; the XHTML language attributes remain present.
- EPUBCheck 5.4.0
- Reports errors
- Epublys structural check
- Warning reported
- Automatic repair
- A repaired copy is available below
Download faulty sample3,256 bytes · EPUB
Source change, diagnostics and checksum
Changed location: OEBPS/package.opf. One intentional change can produce several diagnostic messages.
Before
<dc:language>en</dc:language>
After
EPUBCheck output
RSC-005(ERROR): Error while parsing file: element "metadata" incomplete; missing required element "dc:language"
Epublys output before repair
valid: true; fixCount: 1. A true structural verdict is not proof of EPUB conformance.
- warning: Missing dc:language in metadata
Recorded repair
Download the repaired EPUB (3,358 bytes). EPUBCheck 5.4.0 passes this repaired copy.
Repair SHA-256: 9bbce1901bbafb75ddafeb0cfc3e534c50e6659502ddc12b593ca166d90412fb
Input SHA-256: 5f0f2b1ea7e5884ad6d05c9b4773362a348531f4c07d11c3d1e83f130789e6b7
INTENTIONAL FAULT
Missing container.xml
Only META-INF/container.xml is removed; the package document is still present.
- EPUBCheck 5.4.0
- Reports errors
- Epublys structural check
- Error reported
- Automatic repair
- No repaired copy produced
Download faulty sample2,977 bytes · EPUB
Source change, diagnostics and checksum
Changed location: META-INF/container.xml. One intentional change can produce several diagnostic messages.
Before
entry presentAfter
entry absent
EPUBCheck output
RSC-002(FATAL): Required META-INF/container.xml resource could not be found.
Epublys output before repair
valid: false; fixCount: 0. A true structural verdict is not proof of EPUB conformance.
- error: Missing META-INF/container.xml
- error: Cannot locate OPF package file
Input SHA-256: 04ece61b18efbfd44b4a45bd247ede60524ae364a088051350debb7530bcad3d
INTENTIONAL FAULT
Missing chapter file
The first chapter file is removed, leaving its manifest, spine and navigation references intact.
- EPUBCheck 5.4.0
- Reports errors
- Epublys structural check
- Error reported
- Automatic repair
- No repaired copy produced
Download faulty sample2,612 bytes · EPUB
Source change, diagnostics and checksum
Changed location: OEBPS/chapter-1.xhtml. One intentional change can produce several diagnostic messages.
Before
entry presentAfter
entry absent
EPUBCheck output
RSC-001(ERROR): File "OEBPS/chapter-1.xhtml" could not be found.RSC-012(ERROR): Fragment identifier is not defined.
Epublys output before repair
valid: false; fixCount: 0. A true structural verdict is not proof of EPUB conformance.
- error: Manifest references missing file: chapter-1.xhtml
- warning: 1 broken internal link(s) found
Input SHA-256: 7bda1912d76c11492ad4f024adb601c776e62ec2ebadc30ee1ac5a8ceb0fa4eb
INTENTIONAL FAULT
Broken image reference
One img src points to a nonexistent file; the original diagram remains in the archive.
- EPUBCheck 5.4.0
- Reports errors
- Epublys structural check
- Warning reported
- Automatic repair
- No repaired copy produced
Download faulty sample3,274 bytes · EPUB
Source change, diagnostics and checksum
Changed location: OEBPS/chapter-1.xhtml. One intentional change can produce several diagnostic messages.
Before
src="diagram.svg"After
src="missing-diagram.svg"
EPUBCheck output
RSC-007(ERROR): Referenced resource "OEBPS/missing-diagram.svg" could not be found in the EPUB.
Epublys output before repair
valid: true; fixCount: 0. A true structural verdict is not proof of EPUB conformance.
- warning: 1 broken image reference(s) found
Input SHA-256: 2a23463586bd75a20aebbf53f28f3d9940195f866c859de4bb0d29da8f7b2b5f
INTENTIONAL FAULT
Duplicate ID inside one chapter
Two paragraphs in the same XHTML document have the same ID. IDs in separate documents are a different case.
- EPUBCheck 5.4.0
- Reports errors
- Epublys structural check
- Fault not detected
- Automatic repair
- No repaired copy produced
Download faulty sample3,264 bytes · EPUB
Source change, diagnostics and checksum
Changed location: OEBPS/chapter-1.xhtml. One intentional change can produce several diagnostic messages.
Before
id="second-note"After
id="first-note"
EPUBCheck output
RSC-005(ERROR): Error while parsing file: Duplicate ID "first-note"
Epublys output before repair
valid: true; fixCount: 0. A true structural verdict is not proof of EPUB conformance.
No warnings or errors reported by this structural scan.
Input SHA-256: 73cbd030afc71af42cbf2214565efa7aca80921d26e9418aec621fe52a12c6cc
INTENTIONAL FAULT
Compressed mimetype only
Only the first mimetype entry changes from STORE to DEFLATE. Its text and position remain correct.
- EPUBCheck 5.4.0
- No error reported
- Epublys structural check
- Fault not detected
- Automatic repair
- No repaired copy produced
Download faulty sample3,271 bytes · EPUB
Source change, diagnostics and checksum
Changed location: mimetype. One intentional change can produce several diagnostic messages.
Before
STORE (0)After
DEFLATE (8)
EPUBCheck output
No diagnostic messages.
Epublys output before repair
valid: true; fixCount: 0. A true structural verdict is not proof of EPUB conformance.
No warnings or errors reported by this structural scan.
Input SHA-256: 561551f8acfdd30a6e75068d14614cd8cd5c46013f1402b5684e427d67dbd2ed
What these results do not prove
The examples deliberately expose checker limits. In this recorded run, duplicate IDs inside XHTML and a compressed-only mimetype defect escape Epublys's detailed scan. Its lighter ZIP check rejects the compressed mimetype. EPUBCheck 5.4.0 also reports no error for that compressed-only file, although the OCF mimetype rule requires it to be stored without ZIP compression. A reference-checker pass is not a guarantee that every format rule was checked.
The missing-language repair inserts en. That matches the English control in this collection; it is not a language detector. Set the correct language for your own book.
A conforming file can still have poor layout or inaccessible content. Preview it in the destination reading system and perform accessibility checks separately. These tiny fixtures are not a representative ebook benchmark or evidence of typical compression savings.
Source and reproducibility
Collection version 1.0.0, published . The results record the validator source and options used; software behavior can change after a release. Recorded repair ZIP timestamps are normalized for reproducible checksums without changing entry content, compression or order.
The complete archive includes the original sources, a standalone build package, recorded observations, repaired files and reuse terms. The builder uses JSZip 3.10.2; it does not include Epublys's private application code. Download the source package before running these commands; the script needs the included source and observation files.
unzip epub-validation-lab-source-v1.zip -d epub-validation-lab-source
cd epub-validation-lab-source
npm install --ignore-scripts
node build.mjs --out ./epub-samples
java -jar /path/to/epubcheck.jar ./epub-samples/baseline.epub --failonwarnings
Use the README for the exact build layout and pinned checker instructions. Verify downloads against SHA256SUMS.txt. You can inspect the builder script and collection licence separately.
Reuse and cite the lab
These newly authored sample files and their builder are released under CC0 1.0. You can use them in classes, documentation and software tests. Attribution is welcome, and is not required. The licence applies to this collection, not to the Epublys service or third-party dependencies.
Optional citation: Epublys, EPUB validation and repair lab, version 1.0.0, 2026-10-17, epublys.com/epub-samples.
For broader coverage, use the W3C/IDPF feature samples, the W3C reading-system tests and EPUBTest accessibility books. The EPUB specification defines the format; this lab illustrates a small part of it.