EPUB OPF Metadata Guide
The OPF package document is the central file in every EPUB — it lists every file in the archive, declares the reading order, and contains the book's metadata. When you upload an EPUB to KDP, Apple Books, or Kobo, the first thing the platform reads is your OPF file. Three metadata fields are required by the EPUB specification; missing any one of them fails validation before any store even sees your file.
What is the OPF package document?
Every EPUB archive contains a file typically named content.opf (the name can vary, but the path is declared in META-INF/container.xml). The OPF file has three sections:
- <metadata> — the book's bibliographic data: title, author, language, identifier, and other Dublin Core fields.
- <manifest> — an inventory of every file in the EPUB (HTML chapters, images, CSS, nav.xhtml, toc.ncx). A file that exists in the archive but isn't in the manifest is invisible to reading systems.
- <spine> — the linear reading order: a list of manifest items in the sequence a reader encounters them chapter by chapter.
Stores do not read metadata from your cover image, your chapter files, or your file name. The OPF metadata block is the only place they look for structured book data.
Metadata fields — required and optional
| Field | Status | Example | Notes |
|---|---|---|---|
| dc:title | Required | My Novel | Book title. Missing title fails EPUBCheck and store upload. |
| dc:language | Required | en | BCP 47 language tag. Missing language causes rejection at KDP, Apple Books, and Kobo. |
| dc:identifier | Required | urn:uuid:… or urn:isbn:… | Unique identifier for this EPUB. Must match the package element's unique-identifier attribute. |
| dc:creator | Recommended | Jane Author | Author name. Not strictly required by the spec but expected by stores. |
| dc:publisher | Optional | My Press | Publisher name. Displayed in store listings on some platforms. |
| dc:description | Optional | A story about… | Book description. Stores generally use the description you enter in their dashboard, not this field. |
| dc:subject | Optional | Fiction / Mystery | Subject / genre. Used for BISAC-style categorization in some platforms. |
| dc:date | Optional | 2026-01-01 | Publication date in ISO 8601 format. |
| dc:rights | Optional | Copyright © 2026 | Copyright statement. |
Minimum valid metadata block
A valid EPUB 3 metadata block with the three required fields:
<metadata xmlns:dc="http://purl.org/dc/elements/1.1/">
<!-- Required -->
<dc:title>My Novel</dc:title>
<dc:language>en</dc:language>
<dc:identifier id="book-id">urn:uuid:a1b2c3d4-e5f6-7890-abcd-ef1234567890</dc:identifier>
<!-- Recommended -->
<dc:creator>Jane Author</dc:creator>
</metadata>The <package> element (the root of content.opf) must have a unique-identifier attribute set to the id of the dc:identifier element — in this case, unique-identifier="book-id". EPUBCheck OPF-030 fires when these don't match.
dc:identifier and ISBNs
The dc:identifier field must contain a unique string that identifies this specific EPUB file. Two formats are standard:
- ISBN:
urn:isbn:9780000000000— use this if you have purchased an ISBN for your ebook. - UUID:
urn:uuid:a1b2c3d4-e5f6-7890-abcd-ef1234567890— use this if you don't have an ISBN. Any free UUID generator produces a valid value.
KDP assigns its own ASIN to your book regardless of what appears in dc:identifier. The identifier in the EPUB is used internally by the EPUB specification and by some library catalog systems — it does not control your Amazon or Apple Books product identifier.
Language codes
dc:language uses BCP 47 language tags. Common values:
en— English (no regional distinction)en-US— American Englishen-GB— British Englishfr— French |de— German |es— Spanish |ja— Japanese
A missing dc:language is a required-field error — EPUBCheck flags it, and KDP, Apple Books, and Kobo all reject files without it. It is also used by reading systems to select the appropriate dictionary for spell-check and hyphenation.
How stores use EPUB metadata
Stores validate the required fields (title, language, identifier) and reject files that are missing them. Beyond validation, what platforms actually display from OPF metadata varies:
- KDP: Uses dc:title to pre-fill the book title field in the dashboard, but authors typically override this during setup. The store listing title, description, author, and categories all come from what you enter in the KDP publishing workflow — not from the EPUB file. KDP validates dc:language and dc:identifier but does not display dc:description on the Amazon store page.
- Apple Books: More actively uses OPF metadata. dc:creator, dc:publisher, and dc:language are read and can affect catalog entries. Apple Books is strict about dc:language and rejects files where it is absent or malformed.
- Kobo and Draft2Digital: Both validate required fields. Kobo may read dc:creator and dc:title from the file; Draft2Digital's ingestion pipeline normalizes metadata from the OPF when you upload directly.
The practical rule: treat OPF metadata as what platforms use to validate your file, not as what controls your store listing. Enter title, author, description, and categories in each store's dashboard — don't rely on EPUB fields to populate store listings automatically.
Frequently asked questions
What happens if dc:language is missing from the OPF?
EPUBCheck reports OPF-049 (or similar) and the file fails validation. KDP, Apple Books, and Kobo all reject files without a language declaration. This is one of the most common causes of EPUB upload failures. Add <dc:language>en</dc:language> (or the appropriate BCP 47 tag) to the metadata block.
Does Amazon KDP display dc:description from the EPUB on the store page?
No — KDP does not pull the book description from the EPUB file for its store listing. The description shown on your Amazon product page comes from what you enter in the KDP dashboard during the publishing process. The dc:description field in OPF is read by some other platforms and tools but does not control what appears on Amazon.
Do I need an ISBN in the dc:identifier field?
No. The dc:identifier field requires a unique identifier, but it doesn't have to be an ISBN. If you don't have an ISBN, generate a UUID (any free UUID generator online produces one) and use it as urn:uuid:your-uuid-here. If you do have an ISBN, use urn:isbn:9780000000000. The important thing is that the identifier is unique to this EPUB and that the package element's unique-identifier attribute points to its id.
What language code should I use for English?
Use en for English without a regional distinction, en-US for American English, or en-GB for British English. BCP 47 two-letter codes cover most cases. Use the most specific tag that applies — en-US and en-GB can matter for dictionary selection in reading systems. For other languages: fr (French), de (German), es (Spanish), ja (Japanese), zh (Chinese). A full list is available at IANA Language Subtag Registry.
EPUBCheck reports OPF-030 — what does that mean?
OPF-030 means the package element's unique-identifier attribute points to an id that doesn't exist in the metadata block, or the dc:identifier element is missing entirely. Fix: make sure there is a dc:identifier element with an id attribute (e.g., id="book-id"), and that the package element's unique-identifier attribute is set to that same id value.
Can I add custom metadata fields to the OPF?
Yes, using the meta element. EPUB 3 allows <meta property="custom:field">value</meta> for non-standard metadata. Some tools add their own metadata this way. Stores ignore unknown meta elements, so custom fields do not cause validation failures — but they also have no effect on what stores display or how the book is categorized.
For the full EPUB build workflow — manuscript cleanup, TOC, navigation, and platform submission — see the EPUB formatting guide. For nav.xhtml and toc.ncx format details — how to write EPUB navigation documents and what KDP checks — see the EPUB TOC guide. For EPUB CSS — safe properties for paragraphs, headings, and page breaks across reading systems — see CSS for EPUB files.
For metadata-related validation errors — missing dc:language, missing dc:identifier, OPF-030 — see the missing language declaration error guide and the full EPUB error reference.
Build complete metadata for KDP, IngramSpark, and EPUB OPF — in one form.
Enter your book details once. Get correctly formatted metadata for every platform, ready to copy and paste. Free.
Open Metadata Builder →