All formats

EPUB libraries

Open-source libraries that read and write EPUB files. Most EPUB libraries do one of two jobs: parse a book (metadata, table of contents, chapters as XHTML) or build one from HTML pieces. Libraries that render EPUB to pages, text or PDF need a layout engine; MuPDF (and PyMuPDF) is the main open-source option.

Language Library Read Write Notes
C/C++ MuPDF yes no lays out and renders EPUB, extracts text, converts to PDF; AGPL
C# VersOne.Epub yes no complete EPUB 2 and 3 reader, public domain
C# QuickEPUB no yes create simple EPUBs from HTML sections
Java epub4j yes yes maintained fork of epublib, works on Android
Go go-epub no yes creates valid EPUB 3 files
Go goreader/epub yes no minimal reader: metadata, manifest, spine
Python EbookLib yes yes the standard Python EPUB library; AGPL
Python PyMuPDF yes no text extraction, rendering, convert to PDF; AGPL
Ruby gepub yes yes full EPUB 2 and 3 metadata
Rust epub yes no reads metadata, spine, TOC, resources; GPL-3.0
Rust epub-builder no yes generates EPUB 2 or 3 with TOC
PHP PHP eBook yes basic metadata, cover, chapters; also MOBI and FB2

By language#