How Add PDF bookmarks works
Add PDF Bookmarks lets you build a clickable outline, the navigation panel on the left side of PDF viewers, by typing bookmark titles and assigning each one a target page number. You can create nested levels so top-level chapter headings contain sub-level section entries beneath them. pdf-lib writes the outline tree into the PDF in your browser, and the resulting file is handed to you as a download without any server contact.
PDF bookmarks are stored as a hierarchical outline dictionary inside the file structure. Each entry holds a display title and an action that jumps to a specific page when clicked. This tool constructs that dictionary from your list of titles and page numbers and embeds it in the document. If the PDF already has bookmarks, the new outline you build replaces the existing one. The tool does not scan the document content to detect headings automatically; the outline is built entirely from what you type. What it writes is the standard PDF outline, so the bookmarks show up in Adobe Acrobat Reader, in Preview on macOS, in the viewers built into Chrome, Firefox and Edge, and in most other compliant readers.