EPUB Error: Missing dc:identifier (Unique Identifier)

OPF-030: A dc:identifier element is required in the package metadata. Or: OPF-048: the "unique-identifier" attribute refers to an ID that is not defined anywhere in the document

What causes this error?

Every EPUB publication must have a unique identifier declared in the OPF metadata block as a <dc:identifier> element. This identifier — typically an ISBN, a DOI, or a randomly generated UUID — links the publication to a single edition and allows platforms and reading systems to track it across updates. Beyond the element itself, the <package> root element must have a unique-identifier attribute whose value matches the id attribute of one specific <dc:identifier> element. When the dc:identifier element is entirely absent, EPUBCheck reports OPF-030. When the element exists but the cross-reference between unique-identifier and the element's id is broken, EPUBCheck reports OPF-048 instead. Both indicate a missing or disconnected identifier, but require slightly different fixes.

How to fix it

  1. Open content.opf and check the <metadata> block for a <dc:identifier> element. If missing, add one — if you have an ISBN, use it; if not, generate a UUID and format it as urn:uuid:xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
  2. Give the <dc:identifier> element an id attribute: <dc:identifier id="book-id">urn:uuid:your-uuid-here</dc:identifier>.
  3. Find the opening <package> tag and confirm its unique-identifier attribute value matches the id you just set: <package ... unique-identifier="book-id">. Both values must be identical.
  4. If you are publishing on a platform that assigns ISBNs (KDP, IngramSpark), you can use their assigned ISBN as the identifier value: <dc:identifier id="isbn">978-0-000-00000-0</dc:identifier>.
  5. Re-validate with EPUBCheck to confirm both OPF-030 and OPF-048 are cleared.

Common questions

Do I need an ISBN, or can I use a UUID?

A UUID is perfectly valid as a dc:identifier and is the recommended approach when you don't have an ISBN. Format it as urn:uuid: followed by a standard UUID string. You can generate a free UUID using any UUID generator tool. ISBNs are required by some retailers for print books but are not mandatory for EPUB validation — a UUID satisfies the EPUB spec entirely.

How is this different from the OPF-048 unique-identifier-not-found error?

OPF-030 means the dc:identifier element itself is missing from the metadata block. OPF-048 means a dc:identifier element exists but its id attribute does not match the value in the package element's unique-identifier attribute — it's a cross-reference mismatch rather than a missing element. The fix for OPF-030 is to add the element; the fix for OPF-048 is to align the attribute values on both sides.

Check your EPUB before uploading

The free EPUB Validator catches structure, metadata, and navigation errors — no signup, no Java, runs in the browser.

Validate Your EPUB Free →

Building your EPUB correctly from the start prevents most of these errors before they happen. See the EPUB formatting guide for the full workflow: manuscript cleanup, TOC, front matter, EPUB 3.0 generation, and validation.

Common EPUB errors: Unique identifier not found (OPF-048), Missing language declaration (dc:language), Invalid OPF structure errors

Platform rejection guides: Why IngramSpark rejects books