All formats

LIT (Microsoft Reader eBook)

Full nameMicrosoft Reader eBook (Literature)
Extensions.lit
MIME typeapplication/x-ms-reader
TypeeBook, compressed container of binary-encoded HTML, CSS and images
Starts with49 54 4F 4C 49 54 4C 53 (ITOLITLS)
Specificationnone published; the ConvertLIT source is the de facto reference
Maintained byMicrosoft (discontinued in 2012)
Licenseproprietary, undocumented

LIT is the eBook format of Microsoft Reader, a Windows and Pocket PC reading app. A LIT file packages an Open eBook (OEB 1.x) publication: XHTML-like content, CSS, images and a package manifest. All of it is compressed with LZX inside a container derived from Microsoft’s Compiled HTML Help (CHM) format. Books sold in stores were protected with Microsoft’s DRM.

Microsoft stopped selling LIT books in 2011 and discontinued Reader in 2012. No current device or app reads LIT natively. Today the practical task is converting existing unprotected .lit files to EPUB or PDF.

When to use LIT#

File structure#

A LIT file is a CHM-like container (“ITOL/ITLS” HTML Help 2.0). It starts with a primary header, a list of header pieces, then the content sections. All integers are little-endian.

49 54 4F 4C 49 54 4C 53   signature "ITOLITLS"
01 00 00 00               version 1
28 00 00 00               primary header length (40)
05 00 00 00               number of header pieces (5)
xx xx xx xx               secondary header length
xx (16 bytes)             file GUID (0A9007C1-7640-D311-...)
...                       piece table: 5 x (offset 8 bytes, length 8 bytes)
Part Contents
Primary header signature, version, header lengths, number of pieces, file GUID
Piece 0 total file length
Piece 1 internal directory (IFCM/AOLL chunks, like CHM) listing every stored file
Piece 2 index of the internal directory
Piece 3, 4 fixed GUIDs
Secondary header content offset, entry and timestamp data, language and creator IDs
Section 0 uncompressed storage: the directory, section names, control data
Other sections LZX-compressed (and for DRM books, DES-encrypted) data streams

What’s inside#

The internal directory works like a file system. Important entries:

Entry Contents
/manifest maps internal names to the original file names and MIME types
/meta the OEB package file (.opf) in binary form: title, author, spine
/data/<name>/content one HTML document, in binary “tag” encoding
/data/<name>/atom tag and attribute names used by a document, when not in the built-in table
/data/<name> images (GIF, JPEG, PNG) and CSS, stored as-is
/DRMStorage/ DRM data: DRMSource, DRMSealed, DRMBookplate, ValidationStream, licenses
::DataSpace/NameList, ::DataSpace/Storage/ section names and the transforms (LZX, DES) of each section

HTML is not stored as text. Tags and attributes are replaced by numeric codes from a fixed table, and the text is stored between them. Converters “explode” a LIT file by decompressing each stream and turning the binary tags back into HTML.

DRM#

Microsoft Reader had three protection levels:

Level Meaning
Sealed content is encrypted, but the key is in the file: any Reader opens it
Inscribed sealed, plus the buyer’s name shown in the book
Owner exclusive the key is tied to the reader’s activated Microsoft Passport account

Free and self-made books are usually sealed or unprotected, and all open-source tools read them. Owner-exclusive books need the owner’s private keys.

Converting LIT files#

Specifications and documentation#

Microsoft never published the LIT format. These are the best references:

Software that opens LIT files#

SoftwareWindowsmacOSLinuxWebCanNotes
SumatraPDF✓viewfree, open source; unprotected .lit files
calibre✓✓✓view, convert, createfree, open source; converts LIT to EPUB, PDF, AZW3 and back
ConvertLIT✓✓✓convertfree, open source (GPL); command line clit, extracts the OEB package
Cabriolet✓✓✓convert, createfree, open source Ruby gem; cabriolet lit-extract, no DRM
CloudConvert✓convertonline converter, free tier

Libraries#

Few libraries read LIT; most code that handles it lives inside conversion tools. See all LIT libraries.

C/C++ConvertLIT
RubyCabriolet