How to Add a Clickable Table of Contents to a PDF
Updated 2026-07-10
By "table of contents" we mean the clickable navigation tree in your reader’s sidebar (called Outlines or bookmarks in the PDF standard) - not the printed TOC pages at the front of the document. With it, a thesis, textbook, or manual becomes dramatically easier to navigate.
Below are two approaches ordered from most to least automatic, plus a dedicated section for scanned PDFs. Everything uses a free tool that runs locally in your browser - no upload.
Use the tool: Add a Table of Contents to PDF
Approach 1: Auto-generate (try this first)
Open the TOC generator, load your PDF, and click "Auto-generate". The tool works through several strategies in priority order:
- Read built-in document structure - some PDFs ship with structure tags, the most accurate source
- Parse the printed TOC pages - locate the "Contents" page and read each "title …… page number" line
- Font heuristics - body lines with clearly larger fonts and numbering like "Chapter 3" or "2.1.4" are treated as headings, with levels inferred from size and numbering depth
- Review the generated tree: rename entries, fix pages, drag to adjust levels
Approach 2: Paste the TOC as text (most control)
If auto-detection isn’t ideal - or you already have the TOC text from the publisher’s site or another document - use "Import bookmarks from TOC text". Paste the text and it’s parsed line by line: numbering (1 / 1.1 / 1.1.1) and chapter words decide the hierarchy, the trailing number is the page, and indentation works as levels too.
The key setting is the page offset. Printed page numbers start at page 1 of the body, but the PDF has a cover, title page, copyright page, and the TOC itself before that. If body page 1 is physical page 13, the offset is 12 (physical = printed + 12). Set it once and the whole tree lines up.
What about scanned PDFs?
A scanned book is pure images with no text layer, so normal parsing gets nothing. Auto-generate detects this and switches to an OCR path: a PaddleOCR model running locally in your browser reads the first pages, finds the TOC page, parses each "title …… page" line (tolerating dot leaders mangled by OCR), then scans printed page numbers in the body headers/footers to estimate the physical-page offset.
In real tests, multi-hundred-page scanned books produce outlines that land exactly on chapter title pages. Recognition happens on your machine - the scan is never uploaded.
Check and save
Before saving, spot-check a few entries by clicking them - fix any page numbers directly in the tree. After "Save PDF", the file opens with the TOC panel visible in every reader.
FAQ
Are a PDF table of contents and bookmarks the same thing?
Yes. The clickable navigation in the PDF standard is called Outlines; "TOC", "bookmarks", and "outline" all refer to it. This tool writes standard Outlines.
What if the generated hierarchy is wrong?
The result is fully editable: drag entries to change order and nesting, or delete bad ones. For complete control, use the TOC-text import instead.
How many levels can the TOC have?
No limit in the standard or the tool. Two to three levels (chapter/section/subsection) covers most books.
Why are all my page numbers off by the same amount?
That’s the page-offset issue: printed and physical page numbers start at different points. Set the offset in the TOC-text import (the OCR path of auto-generate estimates it automatically).
Use the tool: Add a Table of Contents to PDF