Skip to main content

How to Create a Proper Ebook Table of Contents

·12 min read·
Table of ContentsEPUBNavigation

Every ebook needs two types of table of contents: one that readers see as a page in the book, and one that e-readers use for their built-in navigation menus. Missing or broken navigation is the single highest-weighted factor in Amazon's suppression risk scoring, worth up to 40 points on the 0-100 scale. An ebook that is perfect in every other way but lacks proper navigation can still land in "Medium Risk" territory.

This guide covers both types of TOC, explains the technical requirements, walks through common mistakes, and gives you a clear checklist for building navigation that works across all retailers and devices.

The Two Types of Table of Contents

Type 1: The HTML TOC (In-Book Page)

This is a visible page within your ebook that lists chapters and sections as clickable links. Readers navigate to it like any other page in the book. It looks like a traditional table of contents in a print book, except each entry is a hyperlink.

The HTML TOC is a regular XHTML file in your EPUB, typically named toc.xhtml or contents.xhtml. Its content is standard HTML, an ordered or unordered list of links pointing to chapter files.

<nav epub:type="toc" id="toc">
  <h1>Table of Contents</h1>
  <ol>
    <li><a href="chapter01.xhtml">Chapter 1: The Beginning</a></li>
    <li><a href="chapter02.xhtml">Chapter 2: The Journey</a></li>
    <li><a href="chapter03.xhtml">Chapter 3: The Arrival</a>
      <ol>
        <li><a href="chapter03.xhtml#section1">The Harbor</a></li>
        <li><a href="chapter03.xhtml#section2">The Town</a></li>
      </ol>
    </li>
  </ol>
</nav>

Type 2: The Navigation Document (E-Reader Menu)

This is a structured file that e-readers parse to populate their built-in navigation menus, the menu you access by tapping a button on your Kindle, Kobo, or Apple Books app. Readers never see this file as a page; they interact with it through the device's native navigation interface.

In EPUB 3, this is the nav.xhtml file (which can double as the HTML TOC). In EPUB 2, it is the toc.ncx file. Most well-structured EPUBs include both for backward compatibility.

How They Relate

AspectHTML TOCNavigation Document
Visible to readersYes (as a page)No (via device menu)
FormatXHTML page with linksnav.xhtml (EPUB 3) or toc.ncx (EPUB 2)
Required by specRecommendedRequired (EPUB 3: nav.xhtml)
Required by retailersYes (Amazon, Apple)Yes (all retailers)
Checked by validatorsEPUBCheck warns if missingEPUBCheck errors if missing
Impact on Amazon rankingModerateHigh (up to -40 risk score)

The short version: you need both. Missing either one causes problems.

Building the Navigation Document (nav.xhtml)

The EPUB 3 navigation document is an XHTML file with a specific structure. It must contain a <nav> element with the epub:type="toc" attribute, and it must be declared in the OPF manifest with the nav property.

Minimum Viable Navigation Document

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:epub="http://www.idpf.org/2007/ops"
      xml:lang="en">
<head>
  <title>Table of Contents</title>
</head>
<body>
  <nav epub:type="toc" id="toc">
    <h1>Table of Contents</h1>
    <ol>
      <li><a href="titlepage.xhtml">Title Page</a></li>
      <li><a href="chapter01.xhtml">Chapter 1</a></li>
      <li><a href="chapter02.xhtml">Chapter 2</a></li>
      <li><a href="chapter03.xhtml">Chapter 3</a></li>
      <li><a href="backmatter.xhtml">About the Author</a></li>
    </ol>
  </nav>
</body>
</html>

Declaring the Navigation Document in the OPF

In your content.opf, the navigation document must appear in the manifest with the properties="nav" attribute:

<manifest>
  <item id="nav" href="nav.xhtml"
        media-type="application/xhtml+xml" properties="nav"/>
  <!-- other items -->
</manifest>

It should also appear in the spine if you want it to be a visible page:

<spine>
  <itemref idref="nav"/>
  <itemref idref="chapter01"/>
  <!-- other chapters -->
</spine>

Nested Navigation for Non-Fiction

Non-fiction books with sections and subsections benefit from nested navigation:

<nav epub:type="toc" id="toc">
  <h1>Table of Contents</h1>
  <ol>
    <li><a href="part1.xhtml">Part I: Foundations</a>
      <ol>
        <li><a href="chapter01.xhtml">Chapter 1: Getting Started</a>
          <ol>
            <li><a href="chapter01.xhtml#tools">Choosing Your Tools</a></li>
            <li><a href="chapter01.xhtml#setup">Setting Up Your Workspace</a></li>
          </ol>
        </li>
        <li><a href="chapter02.xhtml">Chapter 2: Core Concepts</a></li>
      </ol>
    </li>
    <li><a href="part2.xhtml">Part II: Advanced Topics</a>
      <ol>
        <li><a href="chapter03.xhtml">Chapter 3: Optimization</a></li>
      </ol>
    </li>
  </ol>
</nav>

Keep nesting to three levels maximum. Deeper nesting makes navigation menus unwieldy on small screens.

The NCX File (EPUB 2 Compatibility)

The toc.ncx file is the EPUB 2 navigation standard. While EPUB 3 uses nav.xhtml, including a toc.ncx ensures your book works on older e-readers that do not support EPUB 3 navigation.

NCX Structure

<?xml version="1.0" encoding="UTF-8"?>
<ncx xmlns="http://www.daisy.org/z3986/2005/ncx/"
     version="2005-1">
  <head>
    <meta name="dtb:uid" content="isbn:978-0-123456-78-9"/>
    <meta name="dtb:depth" content="1"/>
    <meta name="dtb:totalPageCount" content="0"/>
    <meta name="dtb:maxPageNumber" content="0"/>
  </head>
  <docTitle>
    <text>Your Book Title</text>
  </docTitle>
  <navMap>
    <navPoint id="ch01" playOrder="1">
      <navLabel><text>Chapter 1</text></navLabel>
      <content src="chapter01.xhtml"/>
    </navPoint>
    <navPoint id="ch02" playOrder="2">
      <navLabel><text>Chapter 2</text></navLabel>
      <content src="chapter02.xhtml"/>
    </navPoint>
  </navMap>
</ncx>

Declaring the NCX in the OPF

<manifest>
  <item id="ncx" href="toc.ncx" media-type="application/x-dtbncx+xml"/>
</manifest>
<spine toc="ncx">
  <!-- spine items -->
</spine>

The toc="ncx" attribute on the <spine> element tells EPUB 2 readers where to find the NCX. The id value must match.

What to Include in Your Table of Contents

Always Include

  • All chapters, Every chapter, numbered or titled, gets a TOC entry
  • Front matter, Title page, copyright, dedication (optional for NCX)
  • Back matter, About the Author, Also By, Acknowledgments

Include When Present

  • Parts or sections, If your book is divided into parts, include them as parent entries with chapters nested underneath
  • Major sub-sections, In non-fiction, include key sections within chapters if they are independently useful (e.g., "How to Format Headings" within a chapter on formatting)
  • Appendices, Each appendix gets its own entry
  • Glossary, index, bibliography, Separate entries for each

Do Not Include

  • Every sub-heading, A 30-chapter non-fiction book with 4 sub-sections per chapter does not need 120 TOC entries. Include the most important navigational levels.
  • Individual poems in a collection, Unless there are fewer than 20. For larger collections, group by section.
  • Page numbers, Ebooks do not have fixed page numbers. TOC entries link to anchors, not pages.

How Formatting Tools Handle the TOC

Most formatting tools generate both the HTML TOC and the navigation document automatically. Here is how they compare:

ToolHTML TOCnav.xhtmltoc.ncxCustomizable?
VellumAuto-generatedAuto-generatedAuto-generatedLimited (content only)
AtticusAuto-generatedAuto-generatedAuto-generatedLimited
CalibreAuto-detected from headingsAuto-generatedAuto-generatedYes (via conversion settings)
SigilManualManual (plugin available)Manual (plugin available)Full control
ScrivenerAuto-generated via CompileVaries by versionAuto-generatedModerate
ReedsyAuto-generatedAuto-generatedNot includedNo

If your tool generates the TOC automatically, your main responsibility is ensuring your chapter headings are consistent. The TOC generator picks up <h1> or <h2> tags and creates entries for them. If your headings are inconsistent, some chapters use <h1>, others use <h2>, some use bold paragraphs instead of heading tags, the generated TOC will be incomplete or incorrect.

For more on choosing the right formatting tool, see our EPUB formatting tools comparison.

Common Table of Contents Mistakes

Mistake 1: No Navigation Document at All

This is the most damaging TOC error. Without a nav.xhtml or toc.ncx, e-readers cannot populate their navigation menus. Readers have no way to jump between chapters except by swiping page by page.

EPUBCheck reports this as an error. DAISY Ace flags it as an accessibility violation. Amazon's quality system adds up to 40 points to your suppression risk score.

How to fix: If your formatting tool did not generate a navigation document, open the EPUB in Sigil and use the Table of Contents > Generate Table of Contents feature. Alternatively, upload to Rahatt, the auto-fix feature adds navigation metadata.

Mistake 2: HTML TOC Exists, But Navigation Document Does Not

Some authors include a clickable table of contents page but forget the structured navigation document. The HTML TOC is a convenience for readers; the navigation document is a requirement for the EPUB standard and for e-reader functionality.

Having one without the other is like having a map in the glove compartment but no GPS, technically useful, but not what the system needs.

A TOC entry that points to a non-existent file or incorrect anchor fails silently on most e-readers, the link simply does nothing when tapped. EPUBCheck catches broken internal links, but only if you run validation.

Common causes:

  • Renaming chapter files without updating TOC references
  • Removing a chapter without removing its TOC entry
  • Typos in anchor IDs (e.g., #section1 vs #Section1, case-sensitive)

Mistake 4: Mismatched TOC and Actual Content

Your TOC says "Chapter 5: The Storm" but the actual chapter heading says "Chapter 5: The Tempest." This confuses readers and suggests careless editing. Ensure TOC entry text matches chapter headings exactly.

Mistake 5: TOC Not in the Spine

If your nav.xhtml is in the manifest but not in the spine, it functions as a navigation document but does not appear as a visible page. Some readers expect to find a clickable TOC page in the book, especially when they look for it in the first few pages. Include the nav document in the spine for best reader experience.

Mistake 6: Deeply Nested Navigation

Nesting more than three levels deep creates navigation menus that are unusable on small screens. A five-level deep navigation hierarchy on a Kindle Paperwhite is practically impossible to navigate. Flatten your hierarchy to three levels maximum: Part > Chapter > Major Section.

Testing Your Table of Contents

After building or generating your TOC, verify it with these steps:

  1. Open the EPUB in Calibre's viewer. Use the TOC panel (View > Table of Contents) to check that all entries appear and link to the correct locations.

  2. Open in Apple Books (Mac/iOS). Tap the table of contents button and verify every entry works.

  3. Run EPUBCheck. It catches missing navigation documents, broken links, and structural errors in the nav.xhtml.

  4. Run DAISY Ace. It checks that navigation is accessible and properly structured. See our guide to DAISY Ace for setup instructions.

  5. Preview in Kindle Previewer 3. Amazon's conversion can occasionally alter TOC behavior. Test your navigation in the previewer before uploading to KDP.

  6. Scan with Rahatt. Our scanner evaluates navigation as part of its suppression risk assessment and flags missing or broken navigation structures.

TOC Requirements by Retailer

RetailerHTML TOC Required?Navigation Document Required?Additional Requirements
Amazon KDPRequiredRequired (NCX or nav.xhtml)"Start reading" location must be set
Apple BooksRequiredRequired (nav.xhtml preferred)Strict validation on links
KoboRecommendedRequiredNCX recommended for compatibility
Barnes & NobleRequiredRequiredMust be within first 10% of book
Google Play BooksRecommendedRequiredTolerant of minor issues

Amazon has an additional requirement: the "Start Reading" location. This tells the Kindle where to open the book when a reader purchases it. If not set, Kindle opens to the first item in the spine, which might be your title page or copyright page. Set this by adding the <guide> element in EPUB 2 or using the landmarks nav in EPUB 3:

<nav epub:type="landmarks" hidden="">
  <h2>Guide</h2>
  <ol>
    <li><a epub:type="toc" href="nav.xhtml">Table of Contents</a></li>
    <li><a epub:type="bodymatter" href="chapter01.xhtml">Start Reading</a></li>
  </ol>
</nav>

Frequently Asked Questions

Can I have a table of contents in the back of my book instead of the front?

Yes, and some fiction authors prefer this approach, it lets readers start the story immediately without scrolling past a TOC. However, your navigation document (nav.xhtml / toc.ncx) must still exist regardless of where the visible TOC page is placed in the spine. Amazon recommends a TOC within the first 10% of the book, but a back-matter TOC combined with a proper navigation document works on all platforms.

Do short books (under 10,000 words) need a table of contents?

Yes. Even a single-chapter short story needs a navigation document. The entry can be as simple as one item pointing to the beginning of the text. EPUBCheck and retailer validation systems check for navigation regardless of book length. Amazon specifically requires a TOC for all ebook uploads.

How do I fix a missing table of contents without reformatting my entire book?

Open your EPUB in Sigil, which lets you edit the navigation files directly. Use Sigil's built-in TOC generator (Tools > Table of Contents > Generate Table of Contents) to create entries from your heading tags. If your headings are not properly tagged, you will need to fix them first, see our guide to fixing EPUB accessibility issues for heading hierarchy corrections.

Should my TOC include front matter entries?

Include the title page and copyright page at minimum. Dedications, epigraphs, and forewords are optional but recommended if present. E-readers use front matter entries in the navigation document to enable quick access, and some readers specifically look for these elements.

My formatting tool generated a TOC but Amazon says it is missing. What happened?

This usually means the navigation document (nav.xhtml or toc.ncx) is missing or not properly declared in the OPF, even though a visible TOC page exists. Amazon checks for the structured navigation document, not just a page with links. Open your EPUB in Sigil and verify that the manifest includes a nav item with properties="nav" and that a toc.ncx is present. For a complete diagnostic workflow, see our EPUB validation guide and our complete ebook formatting guide.

Ready to check your EPUB?

Scan Your EPUB Free