What Are CBZ and CBR?
CBZ and CBR are container formats for digital comic books, manga, and graphic novels. They are not new file formats in a technical sense — they are simply renamed archive files:
- CBZ = Comic Book ZIP — a standard ZIP archive renamed with the
.cbzextension - CBR = Comic Book RAR — a standard RAR archive renamed with the
.cbrextension
Inside either archive are sequentially numbered image files (typically JPEG or PNG), one per comic page. Comic book readers display these images in order, full-screen, providing a reading experience equivalent to holding a physical comic.
The simplicity of the format — "just a ZIP/RAR with images inside" — is both its strength (trivially simple to create and inspect) and its weakness (no interactivity, no reflow for different screen sizes, no DRM).
File Naming Convention
The archive contains image files named sequentially. Common naming patterns:
ComicTitle_01.jpg
ComicTitle_02.jpg
ComicTitle_03.jpg
...
ComicTitle_186.jpg
Or with leading zeros to ensure correct alphanumeric sort order:
001.jpg
002.jpg
...
186.jpg
This is critically important: comic readers sort filenames alphanumerically. Without leading zeros:
1.jpg,10.jpg,11.jpg,2.jpg,20.jpg— incorrect sort order001.jpg,002.jpg,010.jpg,011.jpg,020.jpg— correct sort order
A common bug when creating CBZ archives is forgetting leading zeros, causing page 10 to appear between pages 1 and 2.
Image formats inside the archive:
- JPEG — most common; good compression for photographic/painted art; artifacts on crisp line art
- PNG — preferred for line art, manga, black-and-white comics; lossless; larger files
- WebP — increasingly common in newer digital comics; better compression than JPEG or PNG
- AVIF — emerging; even better compression than WebP; limited reader support
CBZ Internal Structure (ZIP)
A CBZ file is literally a ZIP archive. Renamed to .zip, it shows:
Batman_Dark_Knight_Returns_001.cbz
├── Batman_DKR_001.jpg (page 1)
├── Batman_DKR_002.jpg (page 2)
├── ...
├── Batman_DKR_048.jpg (page 48)
└── ComicInfo.xml (optional metadata)
Since CBZ is ZIP, it can be created with any ZIP tool:
# Create CBZ from a folder of images
zip -r "My_Comic_001.cbz" "My_Comic_001/"
# Or on Windows: right-click folder → Send to → Compressed (zipped) folder, then rename .zip to .cbz
ComicInfo.xml — Metadata Standard
The ComicInfo.xml schema (developed by Comixology and adopted by ComicRack) is the de facto metadata standard for CBZ files. When present in the root of the archive, comic readers parse it to display rich information:
<?xml version="1.0" encoding="utf-8"?>
<ComicInfo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Title>The Dark Knight Returns</Title>
<Series>Batman</Series>
<Number>1</Number>
<Volume>1</Volume>
<Year>1986</Year>
<Month>3</Month>
<Writer>Frank Miller</Writer>
<Penciller>Frank Miller</Penciller>
<Inker>Klaus Janson</Inker>
<Colorist>Lynn Varley</Colorist>
<Publisher>DC Comics</Publisher>
<Genre>Superhero</Genre>
<LanguageISO>en</LanguageISO>
<PageCount>48</PageCount>
<BlackAndWhite>No</BlackAndWhite>
<Manga>No</Manga>
<Summary>An aging Bruce Wayne comes out of retirement...</Summary>
</ComicInfo>
Key fields: <Series>, <Number>, <Volume>, <Year>, <Writer>, <Publisher>, <PageCount>, <Manga> (Yes/No — affects right-to-left reading direction in some readers).
CBR: The RAR Problem
CBR files are RAR archives, and RAR is a proprietary format. This creates practical problems:
- Creating CBR requires WinRAR (commercial, Windows-primary) or a third-party tool with RAR write support
- Opening CBR is possible with many readers (they bundle a RAR library), but programmatic processing requires the
unrarbinary - CBR is increasingly deprecated in favour of CBZ for new releases
The comic community has broadly shifted to CBZ as the preferred format for new digital comics precisely because ZIP is open, free, and universally supported. Many tools offer "CBR → CBZ conversion" which is simply: uncompress RAR → recompress as ZIP.
CB7, CBT, CBA: Other Comic Archive Formats
The naming convention extends to other archive formats:
| Extension | Archive | Notes |
|---|---|---|
| .cbz | ZIP | Most common; recommended |
| .cbr | RAR | Legacy; proprietary; discouraged |
| .cb7 | 7-Zip | Better compression; less support |
| .cbt | TAR | Common on Linux/Unix |
| .cba | ACE | Rare; legacy |
CB7 (7-Zip) is technically superior for compression but has limited reader support. The community generally prefers CBZ's universal compatibility.
Comic Book Readers
| Reader | Platform | CBZ | CBR | CB7 | ComicInfo.xml |
|---|---|---|---|---|---|
| Komga | Web (self-hosted) | ✅ | ✅ | ✅ | ✅ |
| Kavita | Web (self-hosted) | ✅ | ✅ | ✅ | ✅ |
| Komodo | Desktop | ✅ | ✅ | ✅ | ✅ |
| YACReader | Desktop/iOS/Android | ✅ | ✅ | ✅ | ✅ |
| CDisplayEx | Windows | ✅ | ✅ | ✅ | ✅ |
| Chunky | iPad | ✅ | ✅ | ❌ | ✅ |
| MangaDex | Web | ✅ | ❌ | ❌ | ❌ |
| Kindle | e-Ink | ❌ | ❌ | ❌ | ❌ |
CBZ vs. PDF for Comics
| Aspect | CBZ | |
|---|---|---|
| Image quality | Lossless (if PNG) | Depends on embedded image compression |
| Zoom/pan | Reader-dependent | Good in most PDF viewers |
| Text layer | No | Possible (searchable text, accessibility) |
| DRM | Not built-in | PDF encryption (weak) or DRM |
| File size | Smaller (raw images) | Usually larger |
| Reading experience | Comic reader optimised | Generic; not comics-optimised |
| Metadata | ComicInfo.xml | PDF metadata |
| Interactivity | None | Links, forms, annotations |
| Creator preference | Digital comics standard | Print-first creators |
For archiving high-quality digital comics, CBZ with PNG images is generally superior. For scanned print comics, CBZ with JPEG provides good compression with minor quality loss.
Converting CBZ/CBR Files
CBR → CBZ (the most common conversion):
# Extract RAR contents, then re-archive as ZIP
unrar x my_comic.cbr ./temp_dir/
cd temp_dir
zip -r ../my_comic.cbz .
Or use tools like ComicTagger, Calibre, or dedicated batch converters.
CBZ → PDF: Each page image becomes a PDF page. Calibre handles this; ImageMagick can process the images programmatically.
PDF → CBZ: Extract pages as images from PDF (using pdftoppm or pdfimages), name sequentially, archive as ZIP with .cbz extension.
Batch conversion of a library: Python's zipfile module can iterate CBZ files; subprocess can call unrar for CBR extraction. Tools like comictagger automate metadata management.
Summary
CBZ is the de facto standard for digital comic books — an elegantly simple format that requires no custom parser, no proprietary tools, and no complex specification. Its ZIP foundation means any language, any platform, and any ZIP utility can create or read CBZ files. The optional ComicInfo.xml metadata schema enables rich library management. The main limitation is the fixed-resolution image nature of the format: unlike EPUB with reflowable text, CBZ pages do not adapt to screen size, requiring readers to zoom and pan on small displays. For the digital comics ecosystem, CBZ has won: it is open, simple, and universally supported.
Related conversions
Archive format conversions used most often: