GuidesThe EPUB format · Published 11 Jun 2026 · Updated 2 Sep 2026 · toolkit.bot

How to Add or Fix a Table of Contents in an EPUB (Calibre and Sigil)

A working table of contents is essential for EPUB distribution — KDP, Kobo Writing Life, and Apple Books all require a navigable TOC. If your EPUB has a missing or broken TOC, here's how to fix it in under 10 minutes.

How EPUB Tables of Contents Work

EPUB 3 uses two TOC components:

Both are generated automatically from heading tags (H1, H2, H3) in your chapter HTML files. No heading tags → no TOC entries. This is why PDFs converted without heading detection produce EPUBs with empty TOCs. Each entry points to a chapter file, optionally with an anchor (chapter2.xhtml#section1), and entries can nest so sub-sections appear indented under their chapter.

The TOC is also an accessibility requirement: EPUB Accessibility 1.1 requires a navigation document with a TOC, because screen-reader users rely on it to jump between chapters instead of paging linearly. A missing or broken TOC is an accessibility failure, not just a store rejection.

Method 1: Rebuild TOC in Calibre

  1. Open Calibre. Add your .epub file.
  2. Right-click → Edit book (opens Calibre's built-in editor).
  3. In the editor, go to Tools → Table of Contents → Edit Table of Contents.
  4. Calibre shows the current TOC. Click Generate TOC from major headings to rebuild from H1/H2/H3 tags automatically.
  5. Review the generated entries — add, remove, or reorder as needed.
  6. Click OK, then File → Save.

This regenerates both the NCX and the NAV document. If your chapter files don't have heading tags, the TOC will still be empty — you'll need to add headings first (see below).

Method 2: Build TOC in Sigil

  1. Open Sigil (free, sigil-ebook.com). Open your .epub.
  2. Go to Tools → Table of Contents → Generate Table of Contents.
  3. The TOC editor shows detected headings. Choose which heading levels to include (H1, H2, H3), drag to reorder, check/uncheck to include or exclude entries.
  4. Click OK. Sigil writes the NCX and NAV files.
  5. Save the EPUB (Ctrl+S).

Adding Heading Tags to Chapter Files

If your EPUB has no headings (common in PDFs converted without layout analysis), you'll need to add them before generating a TOC:

  1. In Calibre's editor or Sigil, open each chapter HTML file in Code View.
  2. Find the chapter title text (currently a <p> tag) and change it to <h1> (main chapters) or <h2> (sub-sections).
  3. After adding headings to all chapters, regenerate the TOC using the steps above.

Common TOC Problems After PDF Conversion

TOC Requirements for KDP, Kobo, and Apple Books

Preventing the Problem at Conversion

If you're converting a PDF to EPUB, use a converter that detects heading structure — this is what generates automatic TOC entries. toolkit.bot uses layout analysis to identify font size, bold, and position patterns to detect headings. The resulting EPUB includes a working TOC without any manual work.

Convert at toolkit.bot/pdf2epub — the EPUB output includes both NCX and NAV documents with entries for all detected chapter headings.

Need an EPUB with a working table of contents from your PDF? toolkit.bot detects headings automatically.

Convert PDF to EPUB →

Related guides