Kepubify is a free, MIT-licensed command-line tool written in Go that converts standard EPUB files into the Kobo EPUB format, aimed at Kobo eReader owners, self-hosters, and developers who need fast, scriptable, standalone conversion without installing a full e-book management suite.
What it is
Kepubify converts EPUBs to Kobo EPUBs — the variant Kobo eReaders render with better typography, faster page turns, and correct reading-position tracking. It lives in the Go ecosystem and ships in three shapes: as a command-line tool, as an embeddable Go library published at pkg.go.dev/github.com/pgaskin/kepubify/v4, and as a browser-based webapp. The repository also bundles two companion utilities on the master branch: covergen, which pre-generates cover images to speed up library browsing on Kobo eReaders while providing higher-quality resizing, and seriesmeta, which scans for EPUBs and KEPUBs and updates the Kobo database with Calibre or EPUB3 series metadata.
The concrete problem it solves is bulk or scripted conversion without Calibre. Calibre is a large, GUI-driven e-book manager, and its conversion pipeline is slow and awkward to automate. Kepubify is a single standalone binary that converts most books in a fraction of a second — the README states 40-80x faster than Calibre — and it is built for pipelining: it reads malformed HTML/XHTML without compounding the damage, and it is safe to run against untrusted books.
Key capabilities
- Converts EPUB to Kobo EPUB (kepub) from a single standalone binary with no runtime dependencies beyond the executable itself.
- Benchmarked at 40-80x faster than Calibre, converting most books in a fraction of a second.
- Optional conversion controls including punctuation smartening, custom CSS injection, and text replacement.
- Tolerates malformed HTML/XHTML by way of a custom fork of
golang.org/x/net/html, producing polyglot HTML/XHTML output for maximum compatibility.
covergen pre-generates cover images for faster Kobo library browsing with higher-quality resizing.
seriesmeta scans EPUBs and KEPUBs and writes Calibre or EPUB3 series metadata into the Kobo database.
- Usable as a Go library, a CLI, or a webapp, with a full test suite and a hardened posture toward untrusted input.
Who uses it and how
- Kobo owners batch-converting a personal library who want kobo-optimized rendering without launching a desktop manager.
- Script and pipeline authors who need conversion callable from shell, makefiles, or automation without a GUI dependency.
- Go developers embedding conversion directly into their own applications through the
github.com/pgaskin/kepubify/v4 package.
- Readers who want conversion without installing anything, using the hosted web version at
pgaskin.net/kepubify/try/.
- Users on Windows, Linux, or macOS who prefer pre-built binaries from the releases page over compiling from source.
Getting started
Install directly with go install github.com/pgaskin/kepubify@latest using Go 1.16 or later, or grab a pre-built binary for Windows, Linux, or macOS from the releases page. To build from source, clone the repository and run go build ./cmd/kepubify.
How it compares
The facts name Calibre as the reference point rather than a list of paid products, and kepubify positions itself as the fast, single-purpose alternative to that pipeline: where Calibre is a full library manager, kepubify is one binary doing one conversion and doing it 40-80x quicker. It is MIT-licensed and fully self-hostable, and because it is also a Go library, its logic can be reused inside other applications instead of being locked behind a desktop GUI.
When to use it — and when not to
A self-hoster needs to operate nothing but the binary itself — no database, no storage service, and no SMTP — which makes it unusually light to run, though building from source requires a Go 1.16+ toolchain, and building seriesmeta additionally requires a C compiler with CGO enabled. Anyone who wants a graphical library manager with metadata editing, format conversion in many directions, and device syncing should stay with Calibre, since kepubify deliberately does not provide those features. The repository carries 29 open issues, and seriesmeta and library consumers should note the reliance on custom forks of upstream packages before depending on them in a larger build.
project readme (upstream, from github) — read inline
kepubify
Kepubify converts EPUBs to Kobo EPUBs. 
Website Download Documentation Web Version pkg.go.dev
About
Kepubify is standalone (it also works as a library or a webapp), converts most books in a fraction of a second (40-80x faster than Calibre), handles malformed HTML/XHTML without causing further issues, has multiple optional conversion options (punctuation smartening, custom CSS, text replacement, and more), has a full test suite, is interoperable with other applications, and is safe to use with untrusted books.
Two additional standalone utilities are included with kepubify. covergen pre-generates cover images to speed up library browsing on Kobo eReaders while providing higher-quality resizing. seriesmeta scans for EPUBs and KEPUBs, and updates the Kobo database with the Calibre or EPUB3 series metadata.
See the releases page for pre-built binaries for Windows, Linux, and macOS. See the website for more documentation, pre-built binaries for Windows, Linux, and macOS, and a web version.
Building
Kepubify requires Go 1.16 or later. To install kepubify directly, run go install github.com/pgaskin/kepubify@latest. To build from source, clone this repository, and run go build ./cmd/kepubify.
On Go 1.17 or later, additional optimizations are automatically used to significantly improve kepubify's performance by preventing unchanged files from being re-compressed. To use a backported version of these optimizations on Go 1.16, add the option -tags zip117 to the build/install command. If you are using kepubify as a library in another application with -tags zip117 enabled on Go 1.16, it must also use the backported package when passing a *zip.Reader to (*kepub.Converter).Transform.
To build seriesmeta, a C compiler must be installed and CGO must be enabled.
Note that kepubify uses a custom fork of golang.org/x/net/html. This fork provides additional options used by kepubify to allow reading malformed HTML/XHTML and to produce polyglot HTML/XHTML output for maximum compatibility. Previously, kepubify replaced it using a replace directive in go.mod, but since the fork is now a standalone package, this is not necessary anymore, and will no longer cause conflicts if used as a dependency in applications requiring golang.org/x/net/html directly.
Branches
This repository contains multiple main branches with code used by kepubify.