The basics
What is an AZW3 file?
AZW3 is the file extension for Kindle Format 8 (KF8), the format Amazon introduced in 2011 with the Kindle Fire. KF8 replaced the old Mobipocket-based format (MOBI 7, as Amazon called it) with HTML5 and CSS3, and added over 150 formatting features, among them fixed layout and embedded fonts.
An AZW3 holds a whole book in one file: text, styles, images, fonts and a table of contents, in the same container as a MOBI file. You'll mostly meet AZW3 as the Kindle download of DRM-free e-book sites and as Calibre's Kindle output: it's the file to copy onto a Kindle with a USB cable, since Kindle e-readers can't open EPUB files directly.
- It reflows, like an EPUB, unless it's one of the fixed-layout books KF8 also supports.
- It's Amazon's own format. The specification has never been published. Tools such as Calibre read and write it from what developers have worked out by studying Amazon's files.
.azw3is the extension, KF8 the format. The same KF8 book can also sit inside a.mobifile, alone or together with an old MOBI version (see below).
Anatomy
What's inside an AZW3 file
From the outside an AZW3 looks exactly like a MOBI: the same Palm database header and record list. The difference is inside. Here is sample-book.azw3 taken apart, with the start of its text as it's stored, before a reader puts the pages back together.
sample-book.azw3: 60,454 bytes, 19 records
Palm database header
00000000 41 5F 53 6D 61 6C 6C 5F … A_Small_Guide_to_Paper_Boats
0000003C 42 4F 4F 4B 4D 4F 42 49 BOOKMOBI, as in a MOBI file
0000004C 00 13 19 records
rec 0 9,124 PalmDOC, MOBI (file version 8) and EXTH headers
rec 1-2 3,237 the text: 7,265 bytes in 3 flows, compressed
rec 3 1 filler
rec 4-5 524 INDX fragment index
rec 6 76 CNCX fragment positions
rec 7-8 552 INDX skeleton index
rec 9-10 496 INDX table of contents (NCX)
rec 11 100 CNCX chapter titles
rec 12 26,599 PNG cover
rec 13 10,233 JPEG thumbnail
rec 14 9,152 PNG folding diagram
rec 15 36 FDST where each flow starts and ends
rec 16-17 88 FLIS, FCIS
rec 18 4 E9 8E 0D 0A end of file
Flows (from the FDST record)
flow 0 0-5,543 XHTML: the contents page and 3 chapters
flow 1 5,543-5,600 CSS: page margins
flow 2 5,600-7,265 CSS: the book's stylesheet
Start of flow 0
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head><title>Contents</title> …
<link rel="stylesheet" type="text/css" href="kindle:flow:0002?mime=text/css"/>
</head>
<body class="calibre" aid="0">
</body>
</html>
<h1 class="calibre1" aid="1">Contents</h1>
… <a href="kindle:pos:fid:0001:off:0000000000" aid="4">Chapter 1. …</a>- 1
42 4F 4F 4B 4D 4F 42 49The same signature as MOBI
BOOKMOBIat bytes 60 to 67. A program that only checks the signature can't tell AZW3 from MOBI; it has to read the file version in the MOBI header, which is 8 here. - 2
rec 0The headers
Record 0 holds a PalmDOC header (compression, text length, encryption), a MOBI header with file version 8 and the positions of the indexes below, and EXTH metadata: title, author Ada Example, language, cover and a description naming this page.
- 3
rec 1-2The text
All the book's text, HTML and CSS, as one stream cut into 4,096-byte records, each compressed with PalmDOC compression.
- 4
FDSTFlows
The stream is divided into flows. Flow 0 is the XHTML of every page; the others hold the stylesheets. The FDST record lists where each flow starts and ends.
- 5
<body class="calibre" aid="0"> </body>A skeleton
Each XHTML file is split in two. The skeleton is the file with an empty body: the
html,headandbodytags. - 6
<h1 class="calibre1" aid="1">Contents</h1>Fragments
The body content follows as fragments. The fragment index and its positions (
P-//*[@aid='0']) tell a reader which skeleton and which element each fragment belongs in.aidattributes mark elements so they can be found again. - 7
kindle:flow:0002?mime=text/csskindle: links
References use Amazon's own URL scheme:
kindle:flow:for a stylesheet flow,kindle:embed:for an image record andkindle:pos:fid:…:off:…for a position in the text. - 8
INDX / CNCXIndexes
Index records for the skeletons, the fragments and the table of contents, with string tables (CNCX) for the fragment positions and the chapter titles.
- 9
PNG / JPEGResources
Images (and embedded fonts, when a book has them) are separate records. Calibre's AZW3 output keeps PNG images as PNG; its MOBI output turns them into JPEG.
Under the hood
How KF8 stores HTML and CSS
A KF8 book starts life as something close to an EPUB: XHTML pages, CSS, images and fonts. Amazon's tools and Calibre then pack those files into the record-based container in a way that lets a reader jump into the middle of a long chapter without parsing it from the top:
- 1Every page is split into a skeleton (the outer tags) and fragments (pieces of the body).
- 2All pages and stylesheets go into one text stream, divided into flows: the XHTML first, then each stylesheet.
- 3Links are rewritten to
kindle:addresses: positions become a fragment number and offset, stylesheets a flow number, images a record number. - 4The stream is cut into 4,096-byte records and compressed, and index records note where every skeleton, fragment and chapter starts.
- 5A reader reverses this: it finds the fragments that belong to the current page, inserts them into the skeleton and renders the result with its own HTML engine.
Converting an AZW3 back to EPUB, with Calibre for example, rebuilds the XHTML files from those pieces. The class names (calibre1, calibre2 …) and the aid attributes left behind show where a book has been through this process.
Variants
AZW3, MOBI, joint files and KFX
Amazon's formats share names and extensions in confusing ways. What matters is what's inside:
| File | What's inside |
|---|---|
.azw3 | A KF8 book on its own. Calibre's AZW3 output is this. |
.mobi (classic) | A MOBI 6 book only. See the MOBI explainer. |
.mobi (joint) | A MOBI 6 book, then a BOUNDARY record, then the same book as KF8. Amazon's KindleGen 2 wrote these from 2011 so one file worked on old and new Kindles. |
.azw | Amazon's older extension, usually a MOBI book with DRM. See the AZW explainer. |
.kfx | KFX (also called AZW8), Amazon's newest format. Calibre can only make it with a third-party plugin that runs Kindle Previewer. |
Amazon's own tools have moved on from KF8 files: Kindle Create makes KPF files for publishing on KDP, and Kindle Previewer converts and previews books for testing. For your own Kindle, Calibre's AZW3 output is the usual route.
Comparison
AZW3 vs MOBI, EPUB and PDF
| AZW3 (KF8) | MOBI 6 | EPUB 3 | ||
|---|---|---|---|---|
| Layout | Reflowable or fixed | Reflowable | Reflowable or fixed | Fixed pages |
| Styling | HTML5 and CSS3 (subset) | Old HTML attributes, no CSS | HTML5 and modern CSS | Exact, set when the PDF is made |
| Embedded fonts | Yes | No | Yes | Yes |
| Open specification | No | No | Yes (W3C) | Yes (ISO 32000) |
| Read on | Kindle e-readers, Calibre | Old Kindles, Calibre | Most reading apps except Kindle's own files | Everything |
| Send to Kindle | Not accepted | Not accepted since 2023 | Accepted, converted for Kindle | Accepted |
For a book you control, keep the EPUB as the master copy. Make an AZW3 from it when you want to load a book onto a Kindle by cable with its formatting intact, and use Send to Kindle with the EPUB otherwise.
Protection
DRM: why a Kindle book won't open elsewhere
Books bought from the Kindle Store normally carry Amazon's DRM. The text is encrypted with a key tied to the Kindle devices and apps registered to the buyer's Amazon account, so the file opens there and nowhere else. The header's encryption field is non-zero, while the title, author and other metadata stay readable.
Calibre, Kindle Previewer and other tools refuse to open or convert protected books. Removing DRM breaks Amazon's terms and is illegal in many countries. AZW3 files you make yourself from an EPUB or Word document have no DRM, and neither do our samples.
Troubleshooting
Why won't my AZW3 open, send or look right?
- Send to Kindle rejects it. The service takes EPUB, PDF, RTF, text, HTML and image files, not Amazon's own e-book formats. Send the EPUB instead, or copy the AZW3 into the Kindle's
documentsfolder with a USB cable. - It won't open in another app. It has DRM, or the app only reads EPUB. Calibre opens DRM-free AZW3 files; most phone reading apps outside Amazon's don't.
- My detector calls it MOBI. Both start with
BOOKMOBI. Read the file version in the MOBI header (offset 36 into record 0): 6 for MOBI, 8 for KF8. - Styling from the EPUB is missing. KF8 supports only part of CSS, and conversion rewrites styles into generated classes. Check the book in Kindle Previewer, which emulates how Kindle devices display it.
- The cover doesn't show on the Kindle. Kindle e-readers often show a default cover for books copied by cable, a long-standing quirk. Copying a cover thumbnail into the Kindle's
system/thumbnailsfolder fixes it. In other apps, check the file has a cover at all: it's found through EXTH record 201.
How to
How to open, edit and convert an AZW3 file
- Read it: on a Kindle e-reader (copy it into the
documentsfolder over USB), or with Calibre's e-book viewer on Windows, macOS and Linux. Amazon's Kindle app for iPhone and iPad doesn't open AZW3 files. Browsers don't display AZW3, so a link to one downloads it. - Preview it as a Kindle would: Amazon's free Kindle Previewer for Windows and macOS emulates Kindle devices and apps.
- Edit it: Calibre's book editor and
ebook-polishwork on AZW3 directly, as they do on EPUB, so you can fix the HTML, CSS and metadata without converting. - Make one:
ebook-convert book.epub book.azw3with Calibre, or use Convert books and choose AZW3. - Convert it:
ebook-convert book.azw3 book.epub(or.pdf,.docx). It works only for files without DRM. - Check its metadata:
ebook-meta book.azw3prints the title, author, description and more.
Free downloads
Sample AZW3 files to download
Free, DRM-free sample AZW3 files for testing Kindle apps, e-book readers, converters and file-type detection. They hold "A Small Guide to Paper Boats" by the fictional Ada Example, made with Calibre 7.6 from an EPUB we wrote, and each converts back to EPUB with its chapters and images intact.
Browsers can't show this kind of file in a page. Download it to open it in the app it belongs to.
What's inside sample-book.azw3
Browsers can't display AZW3, so there's no live preview here. Open sample-book.azw3 in Calibre or on a Kindle to read it, or run calibre-debug --inspect-mobi on it to find these parts.
KF8 only
File version 8 in the MOBI header and no MOBI 6 part, so it's smaller than the joint MOBI sample: 60,454 bytes against 137,779 for the same book.
Metadata
EXTH records for the title, the author Ada Example, publisher, subject, publication date, language and a description that names this page.
Three flows
Four XHTML pages in flow 0 and two stylesheets in flows 1 and 2, with skeleton, fragment and table-of-contents indexes.
A cover and a thumbnail
A 600 × 900 PNG cover drawn for this sample and a JPEG thumbnail, found through EXTH records 201 and 202.
Chapter 2: an image, a list and a table
A PNG diagram with alt text, a numbered list and a bordered table with a caption, all styled by CSS.
Contents page
A Contents page whose links are stored as
kindle:pos:fid:…addresses, plus the NCX index a Kindle uses for its Go To menu.
All sample AZW3 files
Sample AZW3 book
sample-book.azw3 · 59.0 KB (60,454 bytes)
A three-chapter KF8 book with a cover, a contents page, CSS, an image, a list and a table. It's the file taken apart in the anatomy above.
- Testing Kindle apps, readers and converters
- Learning the structure of KF8
Minimal AZW3
sample-minimal.azw3 · 11.8 KB (12,133 bytes)
One text-only chapter with no cover and no images: the MOBI header's first-image field is
FFFFFFFF.- Parser tests: don't assume a cover or image records
- Quick upload and import tests
Uncompressed AZW3
sample-uncompressed.azw3 · 63.0 KB (64,494 bytes)
The sample book with compression type 1 (none), so the skeletons, fragments and CSS are readable in a hex editor.
- Seeing KF8's skeleton and fragment layout
- Testing that parsers read the compression field
Ways to test with them
- File type detection: all three start like a MOBI file. A detector that labels them
application/vnd.amazon.mobi8-ebookmust be reading the MOBI header's file version (8), not justBOOKMOBI. - Metadata extraction: expect the title "A Small Guide to Paper Boats", the author Ada Example and a description mentioning 99helpers.com/file-types/azw3.
- Converters: convert
sample-book.azw3to EPUB and check for three chapters, the cover and the diagram;sample-minimal.azw3should give one chapter and no images. - Kindle sideloading: copy
sample-book.azw3into a Kindle'sdocumentsfolder by USB and check the contents page, the diagram and the table. Expect a default cover in the library: that's the Kindle's sideloading quirk, not the file.
Free to use for testing, teaching and demos, commercially or not, with no attribution needed. A link back to this page is always appreciated.
Put it online
Have an AZW3 file? Give it a link.
Drop an AZW3 on 99helpers and it gets its own link to share. Browsers can't display AZW3 files, so visitors download it and open it on a Kindle or in an e-book app.
Questions
AZW3 files, frequently asked
What is an AZW3 file?
A Kindle e-book in Kindle Format 8 (KF8), Amazon's format since 2011. It stores HTML5, CSS, images and fonts in the same container as the older MOBI format.
How do I open an AZW3 file?
On a Kindle e-reader, after copying it over USB, or with Calibre's e-book viewer on a computer. Browsers can't open it. Files with DRM only open on the Kindle devices and apps of the account that bought them.
What's the difference between AZW3 and MOBI?
Same container, different content. MOBI 6 holds an old HTML dialect without CSS; AZW3 holds HTML5 and CSS3 and supports embedded fonts and fixed layout.
What's the difference between AZW3 and AZW?
AZW is Amazon's older extension, usually for a MOBI book with DRM. AZW3 is the newer KF8 format, with or without DRM.
Can I send an AZW3 to my Kindle with Send to Kindle?
No, the service doesn't accept AZW3. Send an EPUB instead, which Amazon converts, or copy the AZW3 into the Kindle's documents folder with a USB cable.
How do I convert AZW3 to EPUB?
Use Calibre: Convert books, or ebook-convert book.azw3 book.epub. It only works for DRM-free files.
How do I convert EPUB to AZW3?
Use Calibre: ebook-convert book.epub book.azw3. The result keeps most of the EPUB's CSS, unlike conversion to MOBI.
Is AZW3 the same as KF8?
Yes. KF8 (Kindle Format 8) is the format; .azw3 is the extension used for KF8 books on their own, as opposed to KF8 inside a joint .mobi file.
Related formats
Other file types explained
Keep going
Related
Sources
- IANA: application/vnd.amazon.mobi8-ebook
- I Programmer: Kindle Format 8 with HTML5 support (2011)
- Library of Congress: Mobipocket File Format (covers KF8)
- MobileRead Wiki: AZW
- MobileRead Wiki: Kindle Previewer
- Standard Ebooks: how to use our ebooks (AZW3 on Kindles)
Last reviewed 27 October 2026.