🇬🇧 English | 🇺🇦 Українська
FB2 → EPUB3 converter — batch-capable, with a GUI and a CLI.
- Batch conversion — add individual files, entire folders, or any mix; all processed in parallel.
- Faithful output — original FB2 structure, content, and metadata are preserved in the EPUB.
- Proper markup — valid XHTML with semantic tags; no generic
<div class="123">tags. - Table of Contents — configurable heading depth (h1–h6) for both EPUB3 nav and EPUB2 NCX.
- Footnote semantics — EPUB3
epub:typemarkup lets readers render footnotes as popups or at the bottom of a page. - EPUB2 compatibility — NCX and
<guide>are generated alongside EPUB3 structures. - Stylesheet support — ships with a clean built-in CSS; any custom
.cssfile can be substituted. - Passes epubcheck — output is spec-compliant.
User interface
- Ukrainian / English language.
- Light / Dark themes.
- CSS viewer / editor.
- Log viewer.
Planned
- UI to perform CSS tweaks
- Typography post-processing (non-breaking spaces, no-break spans).
- Image optimization (JPEG downscaling, pngquant for grayscale PNGs).
- Splitting of huge XHTML files into smaller chunks for faster rendering.
- Graceful handling of non-standard FB2 structures.
- Auto updater.
Download the latest portable fictionpub.exe from the Releases page — no installation required, just run it.
Basic workflow:
- Add files — use Add Files / Add Folder in the toolbar or drag&drop. Subfolders are scanned recursively.
- Tweak settings — click ⚙ Settings to adjust TOC depth, chapter split level, output folder, and stylesheet.
- Select output — choose Same folder as source (default) or specify a destination folder, optionally mirroring the original directory structure.
- Convert — press Convert. Progress and per-file status (✓ / ⚠ / ✗) are shown in real time.
- Inspect logs — click any status icon to view that file's conversion log, or open the full log from the bottom bar. Status ⚠ Warning means successful conversion, but source FB2 had some minor errors (missing image, broken link or footnote, etc). Status ✗ Failure means that Epub was not created. Double-clicking a successfully converted file opens the EPUB directly. Right click opens a context menu.
fictionpub_cli.exe <input> [options]
<input> can be one or more .fb2 / .fb2.zip files or folders, separated by spaces.
| Option | Default | Description |
|---|---|---|
-o, --output PATH |
next to source | Output folder. |
-t, --toc-depth N |
4 |
Maximum heading level to include in TOC (1–6). |
-s, --split-level N |
2 |
Split chapters into separate files at this heading level (1–6). |
-c, --css PATH |
built-in | Path to a custom CSS file. |
--threads N |
0 |
Number of parallel worker processes. 0 = auto-detect. |
Examples:
# Convert a single file, output next to source
fictionpub_cli.exe book.fb2
# Convert a folder, send all EPUBs to E:\output\
fictionpub_cli.exe D:\books\ -o E:\output\
# Convert multiple folders, deeper TOC, 4 threads
# Usage of -o mirrors folder structure: will create d\books and e\docs folders inside E:\output
fictionpub_cli.exe D:\books\ E:\docs\ -o E:\output\ -t 6 --threads 4Run fictionpub_cli.exe --help to see all options.
Requires Python 3.12+.
pip install git+https://github.com/TinyRaindrop/fictionpub.gitRun GUI (no arguments):
python -m fictionpubRun CLI:
python -m fictionpub <input> [options]Works on Windows, macOS, and Linux. The GUI requires Qt6/PySide6, which is installed automatically as a dependency.
git clone https://github.com/TinyRaindrop/fictionpub
cd fictionpub
pip install -e ".[dev]"Building a portable .exe with Nuitka (Windows, Python 3.12):
python build.pyPrerequisites for building:
- MSVC compiler (or switch to MinGW-w64 in
build_exe.py) makeis optional for makefile scripts (make exe) (install withwinget install GnuWin32.Make, addc:\Program Files (x86)\GnuWin32\bin\to PATH)
Icons by Freepik - Flaticon