
KindleUnpack lets you open any Kindle ebook and extract its source files. Essential for fixing broken ebooks or learning how they’re built.
What is KindleUnpack?
KindleUnpack (originally mobiunpack) is a Python tool that extracts Kindle format files (MOBI, AZW3, PRC) into their component parts:
- HTML/XHTML — the book’s content
- CSS — styling
- Images — covers and illustrations
- NCX/TOC — table of contents
- OPF — metadata
- Fonts — embedded fonts
Download
| Version | Platform | Download Source |
|---|---|---|
| GUI (pyw) | Windows | MobileRead |
| Calibre plugin | Cross-platform | MobileRead |
| Python script | Cross-platform | GitHub |
How to Install
Python Script (Cross-Platform)
- Install Python 3.x
- Download
KindleUnpack.py - Run from command line
Calibre Plugin (Easiest)
- Open Calibre → Preferences → Plugins
- Click Load plugin from file
- Select the downloaded
.zipplugin - Restart Calibre
- Now in Calibre: right-click a book → Unpack AZW3/MOBI
Windows GUI Version
- Download the
.pywfile - Double-click to run
- Select your MOBI/AZW3 file
- Click Unpack
Basic Usage
Command Line
python KindleUnpack.py input.mobi output_folder/
This extracts all files into output_folder/.
Calibre Plugin
- In Calibre, select a book
- Right-click → Unpack AZW3/MOBI
- Choose output directory
- Files are extracted for editing
What You Get
After unpacking, you’ll see:
output_folder/
├── mobi7/ # Old MOBI format version
│ ├── book.html
│ └── images/
├── mobi8/ # KF8/AZW3 format version
│ ├── book.html
│ ├── styles.css
│ └── images/
├── raw/ # Raw binary data
├── metadata.opf # Book metadata
├── toc.ncx # Table of contents
└── cover.jpg # Cover image
Common Use Cases
1. Fix a Broken Ebook
- KindleUnpack the broken file
- Fix the HTML/CSS in a text editor
- Rebuild with KindleGen or Calibre
2. Extract Images
Get high-resolution images from any Kindle book:
- Unpack the file
- Navigate to the
images/folder - Copy the images you need
3. Study Ebook Structure
Learn how professional ebooks are structured:
- Unpack a well-formatted book
- Study the CSS and HTML
- Apply similar techniques to your own books
4. Convert AZW3 to MOBI
- Unpack AZW3 to source files
- Remove KF8-specific features
- Repackage with KindleGen as MOBI
Troubleshooting
| Problem | Solution |
|---|---|
| ”Not a valid Kindle file” | File may be DRM-protected — KindleUnpack can’t remove DRM |
| Missing images | Check mobi8/images/ subfolder |
| Garbled HTML | Try the mobi7/ version instead of mobi8/ |
| Script errors | Update to latest Python 3.x version |
| Calibre plugin not showing | Install from .zip file, not extracted folder |
Limitations
- Cannot remove DRM — only works on DRM-free files
- KFX support is limited — newer Kindle formats may not unpack fully
- Output quality varies — some source files are minified or obfuscated
- Command-line only (the GUI version is basic)