Skip to content
EPUBCheck · NCX (EPUB 2 table of contents)

EPUBCheck NCX-001: NCX uid does not match OPF

Updated:

EPUBCheck NCX-001 is an error message: “NCX identifier ("…") does not match OPF identifier ("…").” The NCX's dtb:uid does not match the package's unique identifier. The NCX is the EPUB 2 table of contents, and its dtb:uid must repeat the identifier the package document names in unique-identifier, or some older reading systems may reject the file.

The official message

NCX identifier ("%1$s") does not match OPF identifier ("%2$s").

Default severity
Error. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.
EPUBCheck version
5.4.0

%1$s, %2$s… are filled in with the file, value or element EPUBCheck found.

Typical causes

  • The book's identifier was changed in the package document but not in the NCX.
  • An NCX copied from another book or from a template.

How to fix it

  1. Find the dc:identifier whose id is named by the unique-identifier attribute of the package element.
  2. Copy its value exactly into the NCX: <meta name="dtb:uid" content="..."/>.
  3. Rebuild the EPUB and run EPUBCheck again to confirm the message is gone.

When it's not this

If the value matches but has spaces or line breaks around it, the note is NCX-004.

Terms used here

Other NCX messages

  • NCX-004 NCX identifier ("dtb:uid" metadata) should not contain leading or trailing whitespace.
  • NCX-006 Empty "text" label in the NCX document

Sources

Message text and severity from EPUBCheck 5.4.0 (W3C, BSD-3-Clause). Explanation by EpubCC.

FAQ

What does EPUBCheck NCX-001 mean?

EPUBCheck NCX-001 is an error message: “NCX identifier ("…") does not match OPF identifier ("…").” The NCX's dtb:uid does not match the package's unique identifier. The NCX is the EPUB 2 table of contents, and its dtb:uid must repeat the identifier the package document names in unique-identifier, or some older reading systems may reject the file.

Is NCX-001 an error?

NCX-001 is reported as error by default. The EPUB breaks a rule of the specification and is invalid. Stores and Send to Kindle may reject it, and EPUBCheck exits with status 1.