What is the DJVU file format?
Files with the .djvu extension contain colourful, high-resolution images of scanned pages of a book, magazine, comic book, catalogue, and similar documents. The main advantage of the .djvu format is its high level of compression, with very high resolution and quality of stored images maintained at the same time.
.djvu is based on segmentation of content and uses the structure of the IFF format as its container. Within separate layers it stores background images, foreground images, and sometimes also an OCR text layer, which facilitates fast navigation across the document and enables quickly copying and searching for fragments of text. The .djvu name (from French "déjà vu") characterises the format's ability to render richly detailed scanned pages almost as they appeared in print. It is characterised by a very high level of compression - even 10 times higher than JPEG for typical scanned pages. .djvu encodes both text and image data. The compression is lossy, so while storing a scanned image, some data is permanently lost.
According to many opinions, .djvu is better than the competing PDF format for scanned material, due to a much lower file volume while maintaining similar quality of scanned images. Every .djvu file begins with the 4-byte identifier AT&T at byte offset 0, followed by an IFF FORM chunk; the form type is DJVU for a single-page document or DJVM for a multi-page one. The alternative extension .djv denotes the identical format.
.djvu compression
Compression in .djvu is efficient because the image is divided into multiple separate layers, each compressed independently. Every page image is split into three layers:
- a background image - usually at a lower resolution, compressed with the IW44 wavelet algorithm
- a foreground image - also at low resolution, likewise compressed with the IW44 algorithm
- a mask image - a high-resolution bitonal layer that uses the JB2 compression method, which identifies identical elements on a page (for instance, the shape of a given letter), then compresses and stores only their locations - instead of encoding the same glyph multiple times as a bitmap
Security & safety
RISK: LOWDjVu is document-image data and is safe to open in a reputable reader. Two cautions: download the reader from the official project page (DjVuLibre on SourceForge, SumatraPDF, WinDjView) rather than ad-laden mirrors like the one in the legacy database; and like any document format DjVu can contain hyperlinks, so treat embedded links with the usual care. The files cannot run macros or code.
Format details
in a nutshellPrograms that open DJVU files
Technical details
deep spec| Magic bytes | `AT&T` (hex `41 54 26 54`) at byte offset 0, immediately followed by an IFF `FORM` chunk |
| Container structure | IFF (Interchange File Format) chunk-based layout; each chunk has a 4-character type ID and a 32-bit length field |
| Form type - single-page | `DJVU` - the IFF form type used for documents containing exactly one page |
| Form type - multi-page | `DJVM` - the IFF form type used for documents bundling multiple pages into one file |
| MIME type | `image/vnd.djvu` |
| Background and foreground codec | IW44 - a proprietary wavelet-based lossy codec developed at AT&T Labs Research; encodes color at reduced resolution |
| Mask layer codec | JB2 - a symbol-based bitonal compressor derived from JBIG2; stores high-resolution black-and-white shapes and their page positions |
| Layer architecture | Three layers per page: background (color, low-res), foreground (color, low-res), mask (1-bit, high-res) |
| OCR text layer | Optional hidden text stored in `TXTz` or `TXTa` chunks, enabling full-text search and clipboard copying |
| Compression ratio vs JPEG | Typically 5-10× smaller than JPEG at equivalent perceived quality for scanned text-and-image pages |
| Color depth | 24-bit RGB for background and foreground layers; 1-bit (bitonal) for the mask layer |
| Typical scan resolution | 300-600 DPI; the per-page resolution is stored in the `INFO` chunk |
| Metadata and navigation | Bookmarks, hyperlinks, and annotations stored in `NAVM`, `ANNO`, and `BOOKMARKS` IFF chunks |
| Alternative extension | `.djv` - identical binary format, shorter filename variant common on older systems |
| Released | 1996 (AT&T Labs Research) |
| Open standard | Yes · royalty-free |
| Specification | djvu.org |
DJVU conversions
Community Q&A
asked by usersNo questions yet - be the first to ask about DJVU files.