LIT (Microsoft Reader eBook)
| Full name | Microsoft Reader eBook (Literature) |
|---|---|
| Extensions | .lit |
| MIME type | application/x-ms-reader |
| Type | eBook, compressed container of binary-encoded HTML, CSS and images |
| Starts with | 49 54 4F 4C 49 54 4C 53 (ITOLITLS) |
| Specification | none published; the ConvertLIT source is the de facto reference |
| Maintained by | Microsoft (discontinued in 2012) |
| License | proprietary, 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#
- Use only to read or convert an existing archive of LIT books.
- Avoid for anything new: nothing creates or sells LIT books, and the format has no public specification. Use EPUB for reflowable books.
- Avoid expecting DRM-protected files to open: open-source tools only read unprotected (or “sealed” with a key you own) files.
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#
- calibre:
ebook-convert book.lit book.epub. Reads LIT without owner-exclusive DRM and writes EPUB, AZW3, PDF and more. - ConvertLIT (
clit):clit book.lit outdir/“explodes” the book into an OEB package (.opf, HTML, images). Zip that folder or open the.opfin calibre to make an EPUB. - SumatraPDF opens unprotected LIT files directly on Windows.
Specifications and documentation#
Microsoft never published the LIT format. These are the best references:
- ConvertLIT source code: the reverse-engineered reader;
lib/litheaders.cdocuments the header layout - litheaders.c on Debian sources: header diagrams, readable online
- calibre LIT reader and writer (Python)
- LIT on the MobileRead wiki
- PRONOM fmt/867: format registry entry with the signature
- Microsoft Reader on Wikipedia
- Unofficial CHM specification: the related CHM container
Software that opens LIT files#
| Software | Windows | macOS | Linux | Web | Can | Notes |
|---|---|---|---|---|---|---|
| SumatraPDF | ✓ | view | free, open source; unprotected .lit files | |||
| calibre | ✓ | ✓ | ✓ | view, convert, create | free, open source; converts LIT to EPUB, PDF, AZW3 and back | |
| ConvertLIT | ✓ | ✓ | ✓ | convert | free, open source (GPL); command line clit, extracts the OEB package | |
| Cabriolet | ✓ | ✓ | ✓ | convert, create | free, open source Ruby gem; cabriolet lit-extract, no DRM | |
| CloudConvert | ✓ | convert | online converter, free tier |
Libraries#
Few libraries read LIT; most code that handles it lives inside conversion tools. See all LIT libraries.
| C/C++ | ConvertLIT |
|---|---|
| Ruby | Cabriolet |