viewhack

Read a .cbz or .cbr comic in your browser

You have a comic or manga as a .cbz, .cbr, .cb7 or .cbt file and no comic reader on this phone or work computer. Drop it here: the pages in the right order, swipe or use the arrow keys to turn them, two pages side by side, right to left for manga, and the series and credits it carries.

The comic is read on your device. It is not uploaded, and nothing in it is fetched or run.

What it shows

What is inside a .cbz or .cbr file

A comic book archive is an ordinary archive of pictures with a different extension: .cbz is a ZIP, .cbr a RAR, .cb7 a 7-Zip archive and .cbt a tar. The names were popularised by CDisplay, an early Windows comic reader, and every comic reader since accepts them. There is no index of pages: the order is the alphabetical order of the file names, which is why scanners pad page numbers with zeros (001.jpg, 002.jpg). When they do not, a plain alphabetical sort puts 10.jpg right after 1.jpg; this reader compares the numbers in names as numbers, so unpadded names still come out right.

Because the extension and the contents are set separately, mislabelled files are common: many .cbr files are really ZIPs and some .cbz files are RARs. viewhack reads the first bytes (PK for ZIP, Rar! for RAR, 7z¼¯' for 7-Zip, ustar at byte 257 for tar), opens the file whatever its name says, and tells you which it is.

Many comics also carry a ComicInfo.xml file, a format from the ComicRack reader that tools such as ComicTagger, Mylar, Komga and Kavita still write. It holds fields like <Series>, <Number>, <Count>, <Writer>, <Penciller> and <Summary>, a <Manga> field (No, Yes, or YesAndRightToLeft for right-to-left reading), and a <Pages> list that can mark the cover and double-page spreads.

How it opens a 300-page comic quickly

Pages are unpacked only when they are needed: the page on screen, the next two, and the thumbnails as they scroll into view. A ZIP's directory at its end says where each page is, so a .cbz page is read straight from its place in the file and inflated by the browser. RAR and 7-Zip files are read by libarchive compiled to WebAssembly, which holds the whole archive in the tab's memory (up to 2 GB). In a solid RAR or a 7-Zip archive, pages are compressed as one stream, so a page near the end takes longer, because everything before it is unpacked first. JPEG, PNG, GIF, WebP, AVIF and BMP pages are drawn by the browser; JPEG XL pages, which most browsers cannot show yet, are decoded by a WebAssembly build of libjxl.

Files it opens

.cbz
A ZIP of pages. The most common comic format, written by ComicRack, Calibre, Kavita, Komga, manga downloaders and most scanners.
.cbr
A RAR of pages, RAR 4 or RAR 5. Common for older scans.
.cb7 and .cbt
A 7-Zip archive or a tar of pages. Rare, but every reader accepts them.
.zip, .rar, .7z, .tar
Dropped on this page, a plain archive of pictures is read as a comic too. On the front page a plain archive opens in the archive viewer instead, which lists every file.

What this cannot do