What is a .opf file?
Open Packaging Format · eBook · International Digital Publishing Forum · 1999
An .opf file is the package document inside an EPUB eBook. It is an XML manifest that lists every file in the book, the reading order and the metadata (title, author, language).
What is a .opf file used for?
Unzip an EPUB and you find an .opf: it is the table of contents for the package, telling a reader which files exist, in what order to read them, and what the book is called. It does not contain the text itself.
You rarely open an .opf on its own; it is part of an EPUB. Calibre also uses standalone .opf files to store a book's metadata alongside it.
How to open a .opf file
The .opf format opens in the following apps, grouped by operating system. If one app does not work, try another from the same list. For a step-by-step walkthrough, see how to open a .opf file.
Windows
- Calibre
- Sigil
- any text editor
macOS
- Calibre
- Sigil
- any text editor
Linux
- Calibre
- Sigil
- any text editor
How to convert a .opf file
You can convert a .opf file to xml using a conversion tool or the export menu of an app that opens it.
.opf file signature (magic bytes)
Programs recognise a .opf file by the bytes at the start of the file, not by its name. These are the signatures for OPF.
| Hex signature | Offset | Note |
|---|---|---|
| 3C 3F 78 6D 6C | 0 | '<?xml' (OPF is XML) |
See the full magic-numbers reference for every format.
Frequently asked questions
What is a .opf file?
An .opf file is the package document inside an EPUB eBook. It is an XML manifest that lists every file in the book, the reading order and the metadata (title, author, language).
What is an .opf file?
The package manifest inside an EPUB: an XML file listing the book's contents, reading order and metadata. It is the index, not the text.
How do I open an .opf file?
Any text editor shows the XML. In practice it lives inside an EPUB, which you open in Calibre or Sigil.
Why does Calibre create .opf files?
Calibre stores each book's metadata in a companion metadata.opf so it can rebuild its library, keeping title, author and cover details alongside the book.
Related formats
Sources
Details on this page were checked against authoritative references: