EPUB Table of Contents: How to Create, Fix, and Navigate It (2026)
The table of contents is the backbone of every EPUB file. It lets readers jump to chapters, lets e-readers display a chapter list, and it is required for accessibility compliance. Yet it is one of the most commonly broken parts of a converted EPUB. This guide explains how the TOC works, how to generate one, and how to fix it when it breaks.
Two TOC formats: NCX and Navigation Document
EPUB 2 uses an NCX file (toc.ncx) — an XML document listing navigation points with labels and content sources. EPUB 3 replaces it with a Navigation Document (nav.xhtml) — an HTML file containing a <nav epub:type="toc"> element. For maximum compatibility most EPUB 3 files include both.
| Format | File | Used by |
|---|---|---|
| NCX | toc.ncx | EPUB 2, older Kindle devices, legacy readers |
| Navigation Document | nav.xhtml | EPUB 3, modern readers (Apple Books, Kobo, Adobe DE) |
How EPUB TOC entries work
Each TOC entry points to an HTML file inside the EPUB, optionally with an anchor (#section-id). The label is the chapter title shown in the reader's chapter list. Nesting is supported — subsections appear indented under parent chapters.
NCX structure (EPUB 2)
<navMap>
<navPoint id="chapter1" playOrder="1">
<navLabel><text>Chapter 1</text></navLabel>
<content src="chapter1.xhtml"/>
</navPoint>
</navMap>
Navigation Document structure (EPUB 3)
<nav epub:type="toc">
<ol>
<li><a href="chapter1.xhtml">Chapter 1</a></li>
<li><a href="chapter2.xhtml">Chapter 2</a>
<ol>
<li><a href="chapter2.xhtml#section1">Section 1</a></li>
</ol>
</li>
</ol>
</nav>
Generate a TOC in Calibre
Calibre can auto-generate or repair a TOC from headings in your content files.
- Open Calibre. Right-click the book → Edit book.
- Go to Tools → Table of Contents → Edit Table of Contents.
- Click Generate ToC from major headings. Calibre scans for
<h1>–<h3>tags and builds entries automatically. - Review and reorder entries in the GUI.
- Click OK, then File → Save.
You can also generate a TOC from the command line:
calibredb add book.epub
calibredb catalog /tmp/catalog.epub --fields title,authors
Generate a TOC with Sigil
- Open the EPUB in Sigil.
- Go to Tools → Table of Contents → Generate Table of Contents.
- Select heading levels to include (H1, H2, H3).
- Click OK. Sigil writes both
toc.ncxand updatesnav.xhtml.
Common TOC problems after PDF conversion
No TOC at all
PDF files have no built-in heading structure that converters can reliably parse. If the PDF has bookmarks (the PDF equivalent of TOC), good converters can extract them. Otherwise the converter has to guess from font sizes — and often gets it wrong. Fix: generate the TOC manually in Calibre or Sigil after conversion.
All chapters listed at the same level
The converter detected headings but ignored nesting. In Calibre's TOC editor, drag entries to create parent-child relationships. In Sigil, edit nav.xhtml directly and wrap nested entries in <ol> elements.
TOC shows page numbers instead of chapter names
This happens when PDF bookmarks contain strings like "Chapter 1 ........ 12". Clean them with a find-and-replace in Sigil's toc.ncx: Edit → Find & Replace → Regex mode, pattern *\.{2,}.*$, replace with nothing.
TOC entries point to wrong pages
After reflowing PDF content into EPUB chapters, page-based anchors break. Regenerate the TOC from headings rather than trying to preserve the original page-based links.
TOC and accessibility
EPUB accessibility guidelines (EPUB A11y 1.1) require a navigation document with a TOC. Screen readers use the TOC to let users jump directly to chapters without paging through content linearly. A missing or broken TOC is an accessibility failure. When converting academic or professional documents, always verify the TOC after conversion.
Convert at toolkit.bot — then open in Calibre to generate a clean TOC from your chapter headings.