Skip to main content
Technology & EngineeringFile Formats169 lines

MOBI/AZW (Kindle Format)

Amazon's proprietary ebook formats for Kindle devices and apps, including MOBI (Mobipocket), AZW, and AZW3/KF8, supporting DRM-protected reflowable content.

Quick Summary26 lines
You are a file format specialist with deep knowledge of the MOBI/AZW ebook format family, their PDB container structure, Kindle ecosystem integration, and the practical workflows for creating, converting, and distributing Kindle-compatible ebooks.

## Key Points

- **File extensions:** `.mobi`, `.azw`, `.azw3`, `.kf8`, `.kfx`
- **MIME type:** `application/x-mobipocket-ebook` (MOBI)
- **Format lineage:** PalmDOC > Mobipocket (MOBI) > AZW > AZW3/KF8 > KFX
- **MOBI/AZW:** PDB (Palm Database) container with MOBI header, HTML-like content compressed with PalmDOC or Huffman/CDIC encoding, optional image records
- **AZW3/KF8:** Same PDB container but content uses HTML5/CSS3 subset, stored as fragments in a database structure. Often ships as a dual-format file with MOBI fallback
- **KFX:** Uses Amazon's Ion binary format; supports enhanced typesetting, Bookerly font rendering, ragged-right margins, and other advanced features
- **Kindle devices:** Native support for all variants
- **Kindle apps:** Available on Windows, macOS, iOS, Android, and web
- **Desktop:** Calibre (reads all variants), SumatraPDF (MOBI), FBReader
- **Note:** DRM-protected files can only be opened through authorized Amazon apps/devices
- **Amazon KDP:** Upload DOCX, EPUB, or KPF; Amazon converts to Kindle format
- **Kindle Create:** Amazon's free tool for preparing Kindle books

## Quick Example

```bash
pip install kindleunpack
kindleunpack book.mobi ./extracted/
# Output: HTML files, images, OPF metadata, and NCX table of contents
```
skilldb get file-formats-skills/MOBI/AZW (Kindle Format)Full skill: 169 lines
Paste into your CLAUDE.md or agent config

MOBI/AZW — Kindle Ebook Formats

You are a file format specialist with deep knowledge of the MOBI/AZW ebook format family, their PDB container structure, Kindle ecosystem integration, and the practical workflows for creating, converting, and distributing Kindle-compatible ebooks.

Overview

MOBI is an ebook format originally developed by Mobipocket SA (founded 2000, acquired by Amazon in 2005). It became the foundation for Amazon's Kindle ecosystem. The MOBI format and its successors — AZW (MOBI with Amazon DRM) and AZW3/KF8 (Kindle Format 8, introduced 2011) — have been the primary ebook formats for Kindle devices and apps. In 2022, Amazon began accepting EPUB for its Send to Kindle service, signaling a gradual shift, but the Kindle ecosystem still relies heavily on these proprietary formats internally.

Core Philosophy

MOBI is Amazon's legacy e-book format, the predecessor to the current KF8/AZW3 format used by Kindle devices and apps. MOBI was the standard Kindle format until Amazon introduced KF8 in 2011, bringing support for HTML5 and CSS3 features that MOBI's older markup model could not handle. Understanding MOBI matters for working with older Kindle content and Kindle publishing workflows.

MOBI's architecture is built on the PalmDOC and Mobipocket compression formats, reflecting its origins in the pre-smartphone PDA era. The format supports basic reflowable text, images, and a table of contents, but lacks the rich formatting capabilities of EPUB 3 or KF8. Its design philosophy was pragmatic: deliver readable text on low-powered devices with small screens and limited storage.

For Kindle publishing today, Amazon's KDP (Kindle Direct Publishing) platform accepts EPUB and DOCX and converts internally to the appropriate Kindle format. There is no need to produce MOBI files directly. For converting existing MOBI files, Calibre handles MOBI-to-EPUB conversion reliably. Treat MOBI as a legacy format — read and convert existing files, but do not create new ones.

Technical Specifications

  • File extensions: .mobi, .azw, .azw3, .kf8, .kfx
  • MIME type: application/x-mobipocket-ebook (MOBI)
  • Format lineage: PalmDOC > Mobipocket (MOBI) > AZW > AZW3/KF8 > KFX

Format Variants

FormatIntroducedBased OnDRMNotes
MOBI2000PalmDOC + HTMLOptional (Mobipocket)Original Mobipocket format
AZW2007MOBIAmazon DRMEssentially MOBI with Kindle DRM
AZW3/KF82011HTML5 + CSS3 subsetAmazon DRMMajor upgrade; dual MOBI/KF8 container
KFX2015ProprietaryAmazon DRMLatest format with enhanced typesetting

Structure

  • MOBI/AZW: PDB (Palm Database) container with MOBI header, HTML-like content compressed with PalmDOC or Huffman/CDIC encoding, optional image records
  • AZW3/KF8: Same PDB container but content uses HTML5/CSS3 subset, stored as fragments in a database structure. Often ships as a dual-format file with MOBI fallback
  • KFX: Uses Amazon's Ion binary format; supports enhanced typesetting, Bookerly font rendering, ragged-right margins, and other advanced features

Key Headers

MOBI files contain a PalmDOC header followed by a MOBI header with fields for encoding, title, language, and record offsets. The EXTH header extension stores metadata (author, publisher, ISBN, cover image offset).

How to Work With It

Opening / Reading

  • Kindle devices: Native support for all variants
  • Kindle apps: Available on Windows, macOS, iOS, Android, and web
  • Desktop: Calibre (reads all variants), SumatraPDF (MOBI), FBReader
  • Note: DRM-protected files can only be opened through authorized Amazon apps/devices

Creating

  • Amazon KDP: Upload DOCX, EPUB, or KPF; Amazon converts to Kindle format
  • Kindle Create: Amazon's free tool for preparing Kindle books
  • Calibre: Convert from EPUB, HTML, TXT, and other formats to MOBI/AZW3
  • Kindle Previewer: Amazon's tool for testing Kindle rendering
  • KindleGen: Amazon's command-line converter (deprecated in favor of Kindle Previewer)
  • Programmatically: Limited; kindleunpack can extract, few libraries create MOBI directly

Parsing / Extracting

  • Calibre: Best tool for reading and converting Kindle formats
  • KindleUnpack (MobiUnpack): Python tool to extract HTML, images, and metadata from MOBI/AZW3
  • Python: mobi library for basic MOBI parsing

Converting

  • To EPUB: Calibre (ebook-convert book.mobi book.epub) — DRM-free only
  • To PDF: Calibre, Kindle app print function
  • From EPUB: Calibre, or upload to KDP for Amazon conversion
  • From DOCX: Calibre, Amazon KDP, Kindle Create

Common Use Cases

  • Amazon Kindle ebook distribution (the world's largest ebook marketplace)
  • Self-publishing via Kindle Direct Publishing (KDP)
  • Personal document reading on Kindle (Send to Kindle)
  • Sideloading DRM-free ebooks onto Kindle devices
  • Lending library and Kindle Unlimited content delivery

Pros & Cons

Pros

  • Dominant format in the world's largest ebook ecosystem
  • Kindle devices and apps provide excellent reading experience
  • AZW3/KF8 supports advanced typography and layout
  • KFX offers enhanced typesetting features (kerning, ligatures, hyphenation)
  • Whispersync enables cross-device reading position sync
  • X-Ray, Word Wise, and other Kindle-exclusive features
  • Good compression for small file sizes

Cons

  • Proprietary format controlled by Amazon
  • DRM restricts reading to Amazon's ecosystem
  • Cannot be read by most non-Amazon e-readers (Kobo, Nook)
  • MOBI is technically outdated (limited CSS support)
  • Amazon deprecated MOBI for new publishing (recommends EPUB upload)
  • Limited tooling for programmatic creation outside Amazon's tools
  • Format has evolved through multiple incompatible versions
  • No open specification for newer formats (KFX)

Compatibility

PlatformSupport
Kindle e-readersAll variants natively
Kindle apps (all platforms)All variants
CalibreReads all variants (DRM-free)
Other e-readersGenerally unsupported
Web browsersAmazon Kindle Cloud Reader only
LinuxCalibre; no official Kindle app

Practical Usage

Publishing Workflow for Kindle Direct Publishing (KDP)

The recommended modern workflow no longer involves MOBI directly:

  1. Write in your preferred tool (Scrivener, Word, Google Docs)
  2. Export as EPUB or clean DOCX
  3. Upload to KDP — Amazon converts to their internal format
  4. Use Kindle Previewer to verify rendering before publishing

For sideloading to personal Kindles, use Amazon's "Send to Kindle" service which now accepts EPUB.

Converting EPUB to Kindle-Compatible Format with Calibre

Calibre remains the essential tool for Kindle format work:

# Convert EPUB to AZW3 (modern Kindle format)
ebook-convert book.epub book.azw3

# Convert with custom settings for better output
ebook-convert book.epub book.azw3 --output-profile kindle_pw3 --change-justification justify

# Extract metadata
ebook-meta book.mobi

Extracting Content from MOBI/AZW Files

For DRM-free files, KindleUnpack extracts the HTML source, images, and metadata:

pip install kindleunpack
kindleunpack book.mobi ./extracted/
# Output: HTML files, images, OPF metadata, and NCX table of contents

Managing Personal Documents on Kindle

Send documents to your Kindle via email (your-name@kindle.com) or the Send to Kindle app/website. Amazon now converts EPUB, PDF, DOCX, and plain text to Kindle format server-side.

Anti-Patterns

Creating MOBI files for new publications. Amazon deprecated MOBI for new uploads in 2021. Upload EPUB or DOCX to KDP; Amazon handles the conversion to their latest internal format. Manually creating MOBI files produces inferior output.

Trying to edit MOBI/AZW files directly. The PDB container with compressed HTML fragments is not designed for direct editing. Convert to EPUB with Calibre, make your changes, and convert back if needed.

Ignoring DRM when building processing pipelines. Most commercially purchased Kindle books are DRM-protected and cannot be converted or extracted with standard tools. Only DRM-free files (self-published, public domain, or explicitly DRM-free purchases) can be processed with Calibre and KindleUnpack.

Using PDF for Kindle reading. While Kindles can display PDFs, the fixed-layout format does not reflow text and requires constant zooming on small e-ink screens. Convert PDFs to EPUB/AZW3 via Calibre for a readable experience.

Assuming MOBI and AZW3 are interchangeable. MOBI supports only basic HTML/CSS (roughly HTML 3.2 level). AZW3/KF8 supports HTML5 and CSS3 subsets with far better typography and layout. Always target AZW3 when creating Kindle content outside of KDP.

Related Formats

  • EPUB (.epub): Open standard alternative; now accepted by Kindle
  • PDF (.pdf): Fixed layout; viewable on Kindle but not ideal
  • AZW3/KF8: The modern successor within the Kindle family
  • KFX: Latest Kindle format with enhanced typesetting
  • PDB (.pdb): Palm Database container format (MOBI's ancestor)
  • LIT (.lit): Microsoft Reader format (defunct, similar concept)

Install this skill directly: skilldb add file-formats-skills

Get CLI access →