Browser-based · PDF → list of links

Extract Links from PDF

List every link in a PDF with the page it is on and the words you click. In-document links show the page they jump to, and web addresses typed as plain text are found too. Fold repeats together and save the list as CSV.

PDF

One PDF at a time, up to 50 MB and 2,000 pages.

Drop a PDF here or click to choose

.pdf

Show these types

Links

The list appears here after the PDF is read.

This tool lists links; it does not visit them, so it cannot tell you which are dead. Paste the unique web addresses into a link checker for that.

Extract Links from a PDF

Operator: Abdulla Al Fahad. How tools are built and checked

A report with sixty links is hard to audit by clicking. This tool lists every link in a PDF in one table: the page it sits on, the words you click, and where it goes. Web, email and phone links are shown as written; a link that jumps inside the document is resolved to the page it lands on, so 'see Appendix B' becomes 'Page 41'.

Two kinds of link are found. The first is the link annotation, the clickable box a PDF author created. The second is a web address typed as plain text that never became clickable, which is common in documents exported from word processors. Both can be listed, repeated targets can be folded together, and the table can be saved as CSV.

Key features

  • URI, email, telephone and in-document links, with internal jumps resolved to page numbers
  • Anchor text taken from the words under each link's box
  • Optional scan for web addresses written as plain text
  • One row per occurrence or one per unique target, with pages and counts
  • Filter by type, copy web and email targets, download CSV

Link types, how internal jumps are resolved and how plain-text URLs are found

Link annotations are read with pdf.js. A URI action gives a web address, a mailto: address or a tel: number, classified as Web address, Email or Phone. A link with a destination is resolved: an explicit destination array points straight at a page, and a named destination is looked up in the file's name tree and then converted from a page reference to a page number. A name the file does not define is listed as an unresolved destination with its name and counted in a notice. Named actions such as NextPage and attached-file links are listed as Other, with a short description.

The anchor text is whatever page text lies inside the link's rectangle, taken from the text layer: pieces that overlap the box on the same line are included, and a piece that is only partly inside is cut by character position. A link drawn over an image, or on a page with no text layer, has an empty anchor.

Plain-text addresses are found by scanning each page's text for http://, https:// and www. followed by non-space characters. Trailing sentence punctuation and an unbalanced closing parenthesis are trimmed, so '(see https://example.com/a).' yields https://example.com/a. An address broken across two lines is not rejoined. A plain-text address that repeats a link annotation on the same page is dropped.

With 'every occurrence' you get one row per link. With 'unique target' rows are merged on a comparison key that ignores the scheme and www., lowercases the host and ignores one trailing slash, so http://www.Example.com/a/ and https://example.com/a count as one. Each merged row lists its pages (1-3, 7), anchor texts and the number of occurrences. A run reads up to 2,000 pages and lists up to 50,000 links.

How it works

For each page the tool asks pdf.js for annotations of the 'display' kind and keeps those whose subtype is Link. It loads the page's text content only if there is a link or the plain-text scan is on, then builds a box for every text piece and matches boxes against each link rectangle.

Internal links are resolved through the document: pdf.js gives either a destination name or an explicit array whose first entry is a page reference; the tool turns the reference into a zero-based page index and shows it one-based. Links are collected page by page, and plain-text repeats of an annotation on the same page are removed at the end.

Common use cases

  • Collecting every reference link of a white paper into a list to run through a link checker
  • Finding the internal 'back to contents' links that point to the wrong page after an edit
  • Pulling email addresses out of a directory PDF where they are clickable mailto links
  • Finding addresses typed in a report that were never turned into links

How to use this tool

  1. Choose the PDF; reading starts straight away.
  2. Leave the plain-text option on to catch typed addresses, or switch it off for clickable links only.
  3. Choose one row per occurrence or per unique target.
  4. Untick the types you do not need, such as Page in this PDF.
  5. Copy the web and email targets, or download the CSV.

Example

A 24-page brochure with 63 clickable links and 5 typed addresses; 'unique target' selected

Page 3:  'Pricing' -> https://example.com/pricing
Page 9:  'See our pricing' -> http://www.example.com/pricing/
Page 12: 'Appendix B' -> internal, destination on page 22
Page 20: plain text 'www.example.org/docs.'

Table (unique targets)

3, 9   Web address   https://example.com/pricing   Pricing | See our pricing   2
12     Page in this PDF   Page 22   Appendix B   1
20     Web address   www.example.org/docs   (no anchor)   1

Tips for best results

  • Use unique targets with the count column to see which link is repeated on every page, such as a footer, and hide it from your audit.
  • Untick Page in this PDF when auditing external links; the list then contains only things a checker can visit.
  • A page number in the row is where the link sits, not where it goes; for internal links the target column gives the destination page.
  • Sort the CSV by the Target column in a spreadsheet to spot the same address spelled two ways.

Common pitfalls

The tool lists links; it does not visit them, so it cannot say which are dead.

A link drawn over a picture has no anchor text, because there is no text under its box.

Plain-text detection finds http, https and www addresses only; a bare domain such as example.com is not matched.

A scanned PDF has no text layer, so typed addresses on it are invisible to the scan.

Common errors and how to fix them

No links were found
Printing to PDF or flattening usually removes link annotations. Open the original file and export again with links enabled, or switch on the plain-text scan.
Named destination "..." is listed with no page
The link points at a bookmark name the file does not contain, often after pages were deleted or merged. The link is broken in the file itself.
A typed address is cut short
An address that wraps onto the next line is not rejoined. Look at the page next to the row and complete it by hand.
"This PDF has N pages; this tool reads up to 2000"
Split the file and run each part.

Best practices

  • Run with plain text on first, then compare with the clickable-only list to see which addresses are not live.

Two different things that look the same on screen

A blue underlined address in a PDF can be a link annotation or ordinary text styled to look like one. Clicking the first works; clicking the second does nothing. Listing both, with a column that says which is which, is the quickest way to find the typed addresses that need to be made clickable.

Frequently asked questions

Does it find links inside images?

It finds the link annotation if one is laid over the image, but there is no anchor text because the image holds no text.

What counts as the same link when removing repeats?

Targets that match after ignoring http or https, a leading www., letter case in the host and one trailing slash.