← toolkit.bot

How to Convert DjVu to EPUB (Free Tools and Step-by-Step Guide)

DjVu is a compressed image format used for scanned books and documents, popular in academic and library archives. Converting to EPUB makes content readable on e-readers. Here's how.

What Is DjVu?

DjVu (pronounced "déjà vu") is a document format designed for high-quality scanned images at small file sizes. It's used extensively by:

DjVu files are typically not natively supported by modern e-readers or devices — converting to EPUB or PDF is required for reading on Kindle, Kobo, or Apple Books.

The Challenge: DjVu Contains Scanned Images

DjVu files store page content as compressed images (not text). Converting to EPUB requires two steps:

  1. Extract pages as images from the DjVu file
  2. Run OCR (optical character recognition) to convert images to text

Without OCR, the "EPUB" is just a sequence of page images — no searchable text, no reflowable layout, no e-reader navigation. For a useful EPUB you need OCR.

Method 1: DjVu → PDF → EPUB (Most Reliable)

The most reliable path is DjVu → PDF → EPUB, using OCR at the PDF stage.

Step 1: Convert DjVu to PDF

# Install DjVuLibre
# macOS: brew install djvulibre
# Linux: sudo apt install djvulibre-bin

# Convert DjVu to PDF
ddjvu -format=pdf book.djvu book.pdf

On Windows, use Any2DjVu or the DjVu Browser Plugin's export function to save as PDF.

Step 2: Convert PDF to EPUB with OCR

Use toolkit.bot to convert the PDF to EPUB with built-in OCR. toolkit.bot detects that the PDF contains scanned pages and applies OCR automatically, producing reflowable text in the EPUB output.

Alternatively, use Calibre: add the PDF → Convert → Output format: EPUB. For OCR on scanned PDFs in Calibre, you'll need to run OCR separately first (e.g., with Adobe Acrobat or ocrmypdf).

Method 2: OCRmyPDF + Direct Conversion

# Install tools
pip install ocrmypdf
# macOS: brew install djvulibre

# Convert DjVu to PDF
ddjvu -format=pdf book.djvu book.pdf

# Run OCR on the PDF (adds a text layer)
ocrmypdf book.pdf book-ocr.pdf --language eng

# Convert OCR'd PDF to EPUB with Calibre
ebook-convert book-ocr.pdf book.epub

ocrmypdf uses Tesseract under the hood. It adds a searchable text layer to the PDF without changing the visual appearance. The resulting PDF converts reliably to EPUB with readable text.

Method 3: Calibre Direct (No OCR)

Calibre can convert DjVu directly to EPUB without OCR:

  1. Add the .djvu file to Calibre.
  2. Right-click → Convert → Output format: EPUB.

However, without OCR, the output will be image-only — each page is an embedded image in the EPUB. Text is not selectable or searchable. This is only useful if you want to read the scanned pages on an EPUB reader without needing text.

Method 4: Online Converters

Online converters are convenient but generally don't perform OCR — they produce image-based EPUBs unless the tool explicitly advertises OCR support.

Quality Expectations

OCR accuracy on DjVu-sourced content depends on:

Have a scanned PDF (not DjVu)? toolkit.bot converts scanned PDFs to EPUB with built-in OCR.

Convert PDF to EPUB →

Related guides