This tool reads the bookmark outline of a PDF and writes it out as a text file. Every bookmark becomes one line, indented to show its level, followed by the page it points to. The PDF itself is not changed. Use it to copy a document's structure into a contents page, an index or an email, or to check that the bookmarks of a merged file still lead to the right pages.
How to use it
- Drop the PDF whose outline you want on the page.
- Under Save as, keep Text list, or choose JSON if a program will read the result.
- Click Extract bookmarks.
- Download bookmarks.txt, or bookmarks.json, and open it in any editor.
What the text file contains
The file lists the bookmarks in the order the reader shows them. A top-level bookmark starts at the left edge, and each level below it is indented by two more spaces. After the title comes a dash and the page number, counted from 1 at the first sheet of the file.
Bookmarks are read at every depth, whether or not a reader would show them expanded. A bookmark whose destination is broken, which happens in files assembled from several sources, is still listed by its title but without a page number.
The JSON choice holds the same outline as a list of entries, each with a title, a page and a level, where level 1 is the top. An entry whose destination is broken has page 0.
When there is nothing to extract
A PDF with no outline is refused with the message that it has no bookmarks. Many documents are in this position, including most scans and many files exported from a word processor without the bookmark option.
A printed table of contents is not a bookmark outline: it is ordinary text on a page. To get that text, use PDF to text. To create an outline where there is none, type one in Add bookmarks.
Using the list
The text list is meant for reading and pasting, the JSON for scripts. To change the bookmarks in a file, open it in Add bookmarks, which loads the existing outline into an editable list. To cut the document into one file per top-level bookmark, use Split by bookmark.
Questions
How do I copy the bookmarks from a PDF?
Run the PDF through this tool and open the text file it returns. Each bookmark is on its own line with its page number, ready to paste elsewhere.
Why does it say this PDF has no bookmarks?
The file has no outline to read. A contents page printed inside the document does not count, because it is page text and not a set of bookmarks.
Why do some bookmarks have no page number?
Their destination could not be resolved to a page. The title is kept in the list so you can see the entry exists; fix its target in Add bookmarks.
Do the page numbers match the numbers printed on the pages?
Not necessarily. They count sheets from the start of the file, so a document with a cover and unnumbered front matter will be offset from its printed numbering.
Does extracting bookmarks alter the PDF?
No. The outline is only read. You get a separate text file, and both it and the upload are deleted automatically within one hour.