📖 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.
Upload PDF
Drop your PDF below. Headings are detected automatically — you can edit them before generating the TOC.
document.pdf
—
TOC Entries 0 entries
Title
Typography
Layout
Insert Position
Table of Contents
How to Generate a Table of Contents
Upload Your PDF
Headings are auto-detected by font size on upload.
Customize Style
Edit entries, choose typography, dot leaders, and insert position.
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.