June 6, 2026 · 8 min read

Calibre 9.9 CLI: Batch Convert EPUB to Kindle & Kobo

If you manage more than a dozen ebooks, the Calibre GUI gets old fast. The command-line tool ebook-convert ships with every Calibre install (including the 9.9.0 release from May 28, 2026) and is the fastest way to convert a single file, a folder, or an entire library to Kindle (KFX/AZW3), Kobo (KEPUB), or PDF. This guide walks through the exact commands, output profiles, and bulk-conversion loops that work on macOS, Linux, and Windows.

TL;DR. Run ebook-convert input.epub output.azw3 --output-profile=kindle_fire for a single book, then wrap it in a for loop for bulk. Use --output-profile=kindle for KFX, kobo for KEPUB, and tablet for PDF. Calibre 9.9.0 adds updated KFX metadata handling and faster KEPUB rendering.

Why use the command line when the GUI exists?

The Calibre GUI is fine for one or two books. Once you have a folder of 50 EPUBs that all need to be on your Kindle by tomorrow, clicking through dialog boxes becomes the bottleneck. The CLI is also scriptable: you can chain it with find, xargs, parallel, or a cron job that watches a Dropbox/ToConvert folder.

  • Speed: No GUI overhead. A 2 MB EPUB converts to AZW3 in about 3 seconds on an M2 Mac.
  • Repeatability: Same flags every time. No "did I check the right box last run?"
  • Bulk: One loop converts a whole library while you sleep.
  • Remote-friendly: Run on a headless server, NAS, or Raspberry Pi.

Install or verify the CLI

The CLI is included with Calibre — you do not need a separate download. On macOS and Linux, the installer adds ebook-convert to your PATH automatically. On Windows, it lands in C:\Program Files\Calibre2\ebook-convert.exe and is added to the user PATH.

Verify the install (and version):

ebook-convert --version
# Calibre 9.9.0  [May 28 2026]

Convert a single EPUB to Kindle (KFX)

The minimum useful command: input, output, and an output profile. For modern Kindles (Paperwhite 5+, Scribe, Colorsoft), use --output-profile=kindle which produces KFX with reflowable text and full typographic features.

ebook-convert "my-book.epub" "my-book.azw3" \
  --output-profile=kindle \
  --enable-heuristics \
  --pretty-print

The --enable-heuristics flag turns on Calibre's smart formatting fixes (common in the GUI's "Heuristic processing" panel). --pretty-print makes the resulting file human-readable when you unzip the AZW3 for debugging.

Convert to Kobo (KEPUB)

Kobo readers want KEPUB — Kobo's EPUB variant that tracks reading position and supports typography controls. Calibre 9.9's KEPUB output is faster than 9.8 and now preserves the original CSS for sideloaded fonts.

ebook-convert "my-book.epub" "my-book.kepub" \
  --output-profile=kobo \
  --ebook-series="My Series" \
  --ebook-series-index=1

The series flags are optional but make a real difference in the Kobo library view — books are grouped and ordered correctly instead of showing as standalone files.

Convert to PDF (for reading on a laptop or tablet)

PDF is the worst format for ebooks (fixed layout, no reflow), but sometimes you need it for a print-ready manuscript or a reading app that does not support EPUB. Use the tablet profile for an A5-ish page size, or kindle_fire for landscape reading on a Fire tablet.

ebook-convert "my-book.epub" "my-book.pdf" \
  --output-profile=tablet \
  --pdf-page-margin-left=36 \
  --pdf-page-margin-right=36 \
  --pdf-default-font-size=12

Batch convert a whole folder (bash / zsh)

This is where the CLI pays for itself. The loop below converts every EPUB in a folder to AZW3 (Kindle) and writes outputs to a sibling kindle/ directory. Works in macOS Terminal and any Linux shell.

mkdir -p kindle
for f in *.epub; do
  ebook-convert "$f" "kindle/${f%.epub}.azw3" \
    --output-profile=kindle \
    --enable-heuristics
done
echo "Done. $(ls kindle | wc -l) books converted."

On Windows (PowerShell), the equivalent is:

New-Item -ItemType Directory -Force -Path .\kindle
Get-ChildItem .\*.epub | ForEach-Object {
  $out = Join-Path .\kindle ($_.BaseName + ".azw3")
  ebook-convert $_.FullName $out --output-profile=kindle --enable-heuristics
}

Parallel batch conversion (GNU parallel)

ebook-convert is single-threaded per book but is happy to run multiple processes in parallel. On an 8-core machine, processing 200 EPUBs goes from 10 minutes to about 90 seconds. Install parallel with brew install parallel or apt install parallel.

mkdir -p kepub
ls *.epub | parallel -j 4 \
  "ebook-convert {} kepub/{.}.kepub --output-profile=kobo"
ls kepub/ | wc -l
# 200

Bonus: list a Calibre library from the CLI

If your books are already in a Calibre library (the metadata.db + folder structure), use calibredb to list or export them without opening the GUI.

calibredb list --library-path ~/Calibre\ Library \
  --fields title,authors,tags,formats
# 200  "Project Hail Mary"        [Andy Weir]             [sci-fi]  [EPUB, AZW3, KFX]
# 201  "The Martian"              [Andy Weir]             [sci-fi]  [EPUB, AZW3]
# ...

No Calibre installed? Convert in your browser

Calibre is a 200 MB download and is overkill if you only need to convert a handful of files. converter-epub.com runs the same conversion engine in your browser — no upload to a server, no install, fully private. Drop in a DOCX, HTML, or TXT file and download a clean EPUB in under five seconds. For one-off conversions, it is the fastest path from "I have a file" to "I have a Kindle-ready EPUB."

FAQ

Q: Does the CLI work the same on Windows, macOS, and Linux?
A: Yes. The binary is named ebook-convert on all three platforms, and the flags are identical. On Windows, the file lives in C:\Program Files\Calibre2\ and is added to the user PATH during install. If the command is not found, run the Calibre GUI once and pick "Set up command line" from the preferences.

Q: Can I convert KFX back to EPUB with the CLI?
A: Yes, with a caveat. You need the KFX input plugin installed (drag the zip into Calibre's preferences, then it becomes available to ebook-convert). Amazon-purchased KFX books are usually DRM-locked and require an additional step to remove the DRM before conversion.

Q: How do I preserve my Calibre metadata (title, author, series) in the output?
A: When you import a book into a Calibre library with calibredb add, the metadata is stored in the library's metadata.db. Running ebook-convert on a file from inside that library automatically reads and re-embeds the metadata. If you convert a file outside the library, pass --title, --authors, and --title-sort flags explicitly.

Q: What is the difference between KFX and AZW3?
A: AZW3 is the older Kindle format (works on every Kindle ever made). KFX is the newer format with better typography, hyphenation, and publisher-style fonts. KFX is required for some newer Kindle features (Word Wise, X-Ray). For a Paperwhite 5 or later, prefer KFX; for an older Kindle Touch or Keyboard, stick with AZW3.

Q: Can I run the CLI on a headless server without a display?
A: Yes — that is exactly what it is for. ebook-convert does not touch the display. It runs on Synology, QNAP, Unraid, a Raspberry Pi, or any container. A common pattern is a cron job that watches an "incoming" folder and writes converted files to a "library" folder.

Conclusion

The ebook-convert CLI turns Calibre from a desktop ebook manager into a scriptable conversion engine. For a single book, one line converts EPUB to Kindle. For a library, a four-line loop processes hundreds of files in a few minutes. Calibre 9.9.0's updated KFX and KEPUB output profiles are the most accurate the project has shipped, and the new metadata handling eliminates the "wrong author sort" problem that plagued earlier versions.

If you would rather not install Calibre at all — or just need a single file converted in a hurry — converter-epub.com does the same job in your browser. No upload, no account, no install. It is the easiest way to go from "I have a DOCX" to "I have a Kindle-ready EPUB" without touching a terminal.