📖 Table of Contents Generator WASM

Auto-detect headings from your PDF and generate a beautifully formatted table of contents. Insert it anywhere in the document.

How it works: The tool scans up to 40 pages, identifies headings by their larger font size, and creates an editable table of contents. Customize the title, typography, dot leaders, and page number style — then insert it at the start, end, or after a specific page. It's fully editable before you save.

Upload PDF

Drop your PDF below. Headings are detected automatically — you can edit them before generating the TOC.

document.pdf

—

TOC Entries 0 entries

Upload a PDF to detect headings, or add entries manually.

Title

Typography

Layout

Insert Position

Live Preview 0 entries
Preview

Table of Contents

Upload a PDF or add entries to see the TOC preview.
Processing…0%
100% private. Nothing was uploaded.

How to Generate a Table of Contents

1

Upload Your PDF

Headings are auto-detected by font size on upload.

2

Customize Style

Edit entries, choose typography, dot leaders, and insert position.

3

Insert & Download

Get a new PDF with the TOC page inserted where you want it.

Frequently Asked Questions

The tool samples up to 40 pages, computes the median font size (body text), then treats any line that's ≥35% larger than body text as a heading candidate. Font size differences also determine nesting depth — the largest headings become top-level entries, smaller ones become children. You can manually rename, reorder, re-level, or delete any entry before generating the TOC.

The page numbers shown are the original page numbers in your PDF. When you insert the TOC, all following pages shift — but the numbers in the TOC still reflect the original positions. If you want the TOC to show the new page numbers after insertion, either insert at the end (so nothing shifts) or manually add 1 to each number in the editor before saving. Most readers consider the TOC page itself as un-numbered, so this usually matches expectations.

Not yet — this tool produces a single-column TOC. Multi-column layouts for very long tables of contents are planned for a future update. For now, if your TOC exceeds one page, the tool automatically continues on additional pages.

Not in this version. The TOC is rendered as text — clickable page links require writing PDF link annotations, which is a planned feature. For clickable navigation, combine this tool with our Add Bookmarks tool: generate the TOC text here, then separately write the outline tree for sidebar navigation.

Three PDF standard fonts: Helvetica (clean sans-serif, default), Times Roman (traditional serif — good for reports and books), and Courier (monospace — rarely appropriate for a TOC, but useful for code-adjacent documents). All three are guaranteed available in every PDF reader without embedding. Custom font support (with embedding) is planned.

No. Everything runs locally with pdf.js and pdf-lib. Your file never leaves your device.

Done!