← toolkit.bot

PDF to EPUB with Chapters: How to Keep Your Table of Contents (2026)

One of the biggest benefits of EPUB over PDF is chapter navigation: tap the contents icon on your e-reader and jump directly to any chapter. But getting those chapters to transfer correctly from PDF depends on what is in the source file. Here is how it works and what to do when it doesn't.

How chapter detection works

A PDF does not inherently know what a "chapter" is. The converter has to infer it. There are two main signals:

  1. PDF bookmarks — the outline panel in Adobe Acrobat. When a PDF has bookmarks, they map directly to chapters and sections. This is the most reliable signal.
  2. Heading heuristics — font size, weight, and position. Text that is significantly larger or bolder than body text is treated as a heading. toolkit.bot uses this when no bookmarks exist.

The output is an EPUB 3 Navigation Document (nav.xhtml), which is what e-readers use to show the chapter list.

When chapters come through correctly

You will get a clean chapter structure when:

When chapters do not come through

Chapter detection fails when:

Fix 1: Add PDF bookmarks before converting

The cleanest fix is to add bookmarks to the PDF before converting. In Word or Google Docs, this means:

  1. Apply the built-in Heading 1, Heading 2 styles to your chapter titles
  2. Export to PDF (File → Export → PDF)
  3. The exported PDF will include bookmarks matching your heading structure

In LaTeX, add \usepackage[bookmarks=true]{hyperref} to your preamble — this is the default for most LaTeX templates.

Fix 2: Post-process the EPUB in Calibre

If you already have the EPUB but the TOC is missing or wrong, open it in Calibre's Edit Book tool:

  1. Open the EPUB in Calibre Edit Book
  2. Go to Tools → Table of Contents → Edit Table of Contents
  3. Add entries manually or regenerate from headings
  4. Save — Calibre rewrites the nav.xhtml automatically

Sigil's TOC editor works similarly and gives more fine-grained control over EPUB 3 nav structure.

Fix 3: Post-process in Sigil for complex documents

For long documents with nested chapters (Part → Chapter → Section), Sigil offers direct XML editing of the nav.xhtml file. You can set exact heading levels, add anchor links, and reorder entries without touching the main content files.

How toolkit.bot handles chapters

toolkit.bot's converter uses a two-pass approach:

  1. First, it checks the PDF for embedded bookmarks. If found, these become the EPUB TOC directly.
  2. If no bookmarks exist, it runs heuristic heading detection: text that is ≥120% the median body font size and appears at the start of a text block is treated as a heading.

The result is an EPUB 3 nav.xhtml that your e-reader reads natively — no extra steps needed for Kindle, Kobo, or Apple Books.

Convert your PDF to EPUB with automatic chapter detection — headings and table of contents preserved.

Convert now — free →

Frequently asked questions

How do I convert a PDF to EPUB and keep the chapters?

Upload the PDF to toolkit.bot. The converter detects heading structure from font size and PDF bookmarks, then builds a proper EPUB navigation document (table of contents) automatically. If your PDF has embedded bookmarks, all chapters will appear in your e-reader's TOC.

Why does my EPUB have no table of contents after conversion?

The source PDF has no embedded bookmarks or heading structure that the converter can detect. This is common with scanned PDFs and some LaTeX documents. You can add a TOC manually in Calibre's metadata editor or Sigil's TOC editor after conversion.

Can a converter create chapters from a PDF that has no structure?

Not reliably. Without heading markers or bookmarks in the PDF, the converter is guessing. toolkit.bot uses heuristic font-size analysis to detect likely headings, but a structurally flat PDF (where all text looks the same) will produce a single-chapter EPUB.

How do I add bookmarks to a PDF before converting?

In Adobe Acrobat, use the Bookmarks panel to manually add chapter bookmarks. In Word or Google Docs, export with heading styles applied — the PDF export will include bookmarks automatically. In LaTeX, the hyperref package creates PDF bookmarks from \chapter and \section commands.

Does the EPUB table of contents work on Kindle and Kobo?

Yes. toolkit.bot generates an EPUB 3 Navigation Document (nav.xhtml) which is read by Kindle, Kobo, Apple Books, and all modern e-readers. The TOC appears in the e-reader's built-in chapter/location menu.