Format Basics

What Is DjVu? The Format That Compresses Scanned Books Better Than PDF

You downloaded a textbook or a rare book, and instead of a familiar PDF you got a .djvu file that no ordinary viewer will open. Behind that odd extension sits an elegant engineering idea: take a page apart into layers and compress each one its own way. Let's unpack how DjVu fits a 600-DPI book into a few megabytes — and why it still lives in libraries.

Shelves of an old library lined with books — exactly the kind of editions digitized en masse in DjVu
DjVu was born so a whole library could fit on a disk and open fast over a slow connection. Photo: Pexels

What DjVu is in plain English

DjVu (pronounced "déjà vu," the French phrase for "already seen") is a format for storing scanned documents: books, magazines, old textbooks, drawings. Its single goal is to make a scan of a paper page take up as little space as possible while staying readable.

If PDF is a universal "container for everything" (text, layout, forms, signatures), DjVu is a narrow specialist. It can barely do anything except one thing: show scans. But it does that so well that a book page in DjVu often weighs 5–10 times less than the same scan saved as an ordinary PDF or a JPEG.

In short

DjVu is an "archiver for scans." It slices a scanned page into layers and compresses each one its own way. As a result a thick book fits into a file the size of a couple of photos — and loads fast even on a weak connection.

Where it came from: scientists at AT&T Labs

DjVu didn't come from a corporation chasing profit — it came from a research lab. It was developed at AT&T Labs in Red Bank, New Jersey, between 1996 and 2001. Among the authors are names the whole AI world now knows: Yann LeCun and Yoshua Bengio (both later Turing Award winners), along with Léon Bottou, Patrick Haffner and others.

The problem was very specific for its time. It's the late 1990s, almost nobody has broadband, and pages crawl in over a modem. Yet people want to digitize entire libraries. A good-quality book-page scan (300–600 DPI) in JPEG weighed hundreds of kilobytes — putting that online was painful. The world needed a format that would shrink scans dozens of times over without turning the text to mush.

Antique books with 1880s dates embossed on their spines — typical material for digitization
Editions like these — old, valuable, bulky — were among the first candidates for digitizing into DjVu. Photo: Pexels

The core idea: three layers per page

Here is the genius of DjVu. The authors noticed something simple: a book page holds two completely different "things." There's crisp black text — sharp edges, just two colors. And there's the background — yellowish paper, illustrations, stains, smooth color gradients. Compressing them with one algorithm is a mistake: what works for text is bad for a photo, and vice versa.

So when encoding, DjVu takes each page apart into three layers:

  • Mask — a high-resolution black-and-white layer (say, 300 DPI). This is where the text lives: the sharp outlines of letters that must stay perfectly crisp.
  • Foreground — the color of the letters themselves, kept at low resolution. The ink colour barely changes from letter to letter, so it doesn't need fine detail.
  • Background — the color of the paper and the illustrations, also at low resolution (around 100 DPI). Your eye won't notice fine background detail behind the text anyway.

Each layer is then compressed by its own algorithm, perfectly matched to its nature. Sharp text by one, blurry background by another. That separation is the source of the small-size magic.

DjVu doesn't see a page as one picture. It sees text on top of a background — and compresses them separately. That's the whole trick.

JB2 and IW44: how the tiny size happens

Two different codecs do the compressing — one per type of content.

JB2 compresses the black-and-white text mask (it's a relative of the JBIG2 standard). Its trick is clever: the algorithm finds repeating shapes on the page — for instance, every letter "a" in one font and size looks almost identical. Instead of storing a thousand separate "a"s, JB2 saves the shape of the letter once, then simply records "an 'a' goes here, and here, and here." Text is endless repetition of the same glyphs, so the savings are enormous.

IW44 is a wavelet codec that compresses the color background and foreground. Wavelet compression excels at exactly this kind of smooth imagery: it drops details the eye can't tell apart and barely touches quality where it matters. Since the background is stored at low resolution, it compresses down to almost nothing.

Full name
DjVu (déjà vu)
Extension
.djvu, .djv
Developer
AT&T Labs
Created
1996–2001
Compression
JB2 + IW44
Purpose
Book and document scans

The numbers that impress

One scanned book page in DjVu weighs roughly 10–25 KB, a black-and-white technical page 15–40 KB, a color magazine spread 40–70 KB. A 600-DPI scan in DjVu is about 30–50 KB versus roughly 500 KB for the same scan as JPEG. A whole thick textbook — a few megabytes.

The OCR layer: a picture you can search

At first glance DjVu is just a set of page images. But the format has a pleasant superpower: a hidden text layer. When a book is digitized, optical character recognition (OCR) software "reads" the scans and attaches invisible text precisely aligned to the words in the image.

The result: you see a photo of the page with all its blemishes and period typeface, yet you can select words, copy them and search the entire book like a normal document. A picture for the eye, text for search. One caveat: not every file has this layer. If a book was scanned in a hurry without OCR, you can't search it — only flip through.

DjVu today: alive or dead?

The honest answer is somewhere in between. Development has essentially stopped: no new versions ship, and LizardTech, the company that owned the commercial edition, wound it down long ago. A turning point came in 2002, when the Internet Archive chose DjVu for its Million Book Project and digitized millions of editions in it. But in 2016 that same Internet Archive announced it would no longer create new DjVu publications: browsers had dropped the old plugins, and the Java viewer became hard to maintain.

And yet the format hasn't vanished. Millions of already-digitized books live on in DjVu — in libraries, scientific archives, private collections. So while hunting for a rare textbook or an old monograph, you may well run into .djvu. The format isn't evolving, but it isn't dying either — it has simply become the keeper of a vast legacy.

Dense rows of old bindings on archive shelves — a legacy largely digitized in DjVu
Millions of books from storage like this have long existed as DjVu files. Photo: Pexels

How to open and what to do with DjVu

Double-clicking a .djvu on a fresh system usually does nothing — you need a reader app. There's no shortage: on Windows it's WinDjView or SumatraPDF, on Mac MacDjView, on a phone FullReader or PocketBook.

But if you'd rather not install a separate app for one file, there's an easier path — convert DjVu to PDF. PDF opens literally everywhere: any computer, phone, browser, e-reader. You turn a niche format into a universal one and stop depending on a special reader.

1

Upload the file

Drag your .djvu into an online converter — nothing to install.

2

Get a PDF

Every page is carried neatly into a multi-page PDF with no loss of scan quality.

3

Read anywhere

The finished PDF opens on any device and prints easily.

Open your DjVu book right now

The FormatZ converter turns a rare .djvu into a universal PDF in a couple of seconds — right in your browser, with no install and no sign-up.

Convert DjVu to PDF

Want to dig deeper into the differences? Read our detailed DjVu vs PDF comparison or the practical guide on opening DjVu on any device. And the full list of supported conversions is always on the all formats page.

PDF is a universal container for any document: text, layout, forms, signatures. DjVu is built for one job — compressing scanned pages. It splits the scan into layers and compresses each with its own algorithm, so a book page in DjVu often weighs 5–10 times less than the same scan in an ordinary PDF.
The secret is layer separation. Black text is stored apart from the color background: the letters live in a sharp black-and-white layer (the JB2 codec), while the background and pictures live in a blurry low-resolution color layer (the IW44 wavelet). JB2 also remembers each unique letter once instead of a thousand times. Together that yields huge savings.
Yes, if an OCR layer was added during digitizing. It's invisible text tied to the words on the scan: you see the page image, but you can select and search words just like in a normal document. Not every DjVu has this layer — it depends on how the file was prepared.
Development has essentially stopped, and the Internet Archive halted new DjVu publications back in 2016. But millions of already-digitized books in libraries and archives remain in DjVu, so you can still run into a .djvu today. For everyday use it's usually converted to PDF.
You need a reader app: on Windows, WinDjView or SumatraPDF; on Mac, MacDjView; on a phone, FullReader or PocketBook. If you'd rather not install anything, just convert DjVu to PDF — for example with the FormatZ online converter — and open the result in any viewer.