Convert E-books with calibre's ebook-convert

Convert between EPUB, MOBI, AZW3, PDF and more from the terminal using calibre's command-line converter — no GUI needed.

LinuxcalibreconversionebookLow risk
Run ebook-convert book.epub book.mobi --enable-heuristics to convert an EPUB for a Kindle.

01Command

Command
$ ebook-convert book.epub book.mobi --enable-heuristics

02What it does

ebook-convert supports dozens of input and output formats and powers the conversions inside calibre's GUI. --enable-heuristics fixes common formatting problems (missing chapter breaks, hard line breaks) when the source is messy; the output format is inferred from the output filename's extension. Fine-tune with options like --paper-size for PDF output or --extra-css for styling, and convert a batch with a simple for loop. Note that PDF input converts poorly — PDFs are fixed-layout, so results are best with EPUB/MOBI sources.

03Risk

RiskLow risk
Requirementscalibre (sudo apt install calibre / download from calibre-ebook.com)
!Warning: DRM-protected e-books (most Kindle/Adobe store purchases) cannot be converted — this tool works only on DRM-free files.

04Undo

✓No undo needed — this command does not change persistent state.

05Sources

  • ebook-convert — calibre manual
    calibre · vendor-doc · 2026-09-17
    Evidence: Complete reference for ebook-convert: supported input/output formats, --enable-heuristics and conversion options.
  • calibre — Conversion tutorial
    calibre · vendor-doc · 2026-09-17
    Evidence: Explains conversion concepts, heuristics processing, and format-specific options for e-book conversion.

Last verified: 2026-09-18 · Category: Media