Skip to content

Add and edit links

Make the URLs in a document clickable, or take the outbound ones out.

Processed on your device

This tool runs entirely in your browser. Your file is never uploaded, and you can verify that in your browser's network tab. Verify it yourself: open your browser's network tab and watch. You will see one small request asking whether you have tasks left - a tool name and a hash, never the file.

What this does

A URL printed in a PDF is usually not a link. It is text that looks like one, because whatever produced the document wrote the characters and never created the annotation that makes them clickable. This tool finds those and makes them real, lets you draw links by hand over anything else, and can strip existing links out. Links are annotations laid over a rectangle, so nothing about the page's appearance changes either way.

The common case is a document exported from a design tool or scanned from print where every web address is dead text. The other direction matters too: stripping outbound links from a document before it goes somewhere untrusted, or before it is published, so nobody follows a tracking address that was fine internally.

How it works

  1. Drop the PDF onto this page.
  2. Leave automatic detection on for a first pass. Every URL and e-mail address found in the text is listed with the page it sits on.
  3. Draw a rectangle over anything else that should be clickable and give it a web address, or a page number to jump to inside the document.
  4. Turn on replacing existing links if the document already carries some and you would rather start clean.
  5. Press Save links and download the result.

Detection is harder than a regular expression over the page text, which is why most tools that offer it miss half the links. A PDF regularly splits one URL across several text runs, so a naive scan finds "https://exa" and "mple.com/report" and links neither. The runs on each line are joined before matching, which finds the whole address. Trailing punctuation is then trimmed - the full stop that ended the sentence rather than the one inside the domain - and a closing bracket is only dropped when it is unbalanced, because plenty of real addresses end in one and truncating those produces a link that leads nowhere. What is not linked is as deliberate as what is. A bare host with no dot in it is rejected, because in running prose "e.g" and "vs" match far more often than "http://localhost" appears, and a wrong link is worse than a missing one. An address beginning www. gets https:// in front of it, since a bare host is not a URI and readers show the annotation as broken. E-mail addresses become mailto: links, and an address inside a URL is not linked twice.

Links are written without a border and with the print flag set. The first is what stops readers drawing the black box round every link that made documents from the 1990s so recognisable; the second is what keeps the link alive when someone prints the document back to PDF. Internal jumps are written as explicit destinations that preserve the reader's current zoom and land at the top of the target page, rather than as named destinations, which break as soon as anyone splits or merges the file.

Running detection twice on the same document adds a second annotation over the same words unless you turn on replacing existing links first. Two stacked links behave unpredictably - readers pick whichever they find first - so turn that option on for a second pass, and leave it off when the document already carries hand-made links you want to keep.

Stripping outbound links is a separate pass and it ignores everything else on the page: every link with a web address is removed and the internal page-to-page jumps are kept, so a document keeps its own navigation and loses its ability to send a reader anywhere. Sanitise PDF is the wider version of this, removing JavaScript, launch actions and embedded files as well.

Detection needs the text of the document, which is read in your browser by PDF.js, and the annotations are written by pdf-lib in a Web Worker. No address in your document is looked up, resolved or checked against anything - which also means a link to a page that no longer exists is written exactly as printed.

What this tool cannot do

  • Detection can only find what is in the text layer. A scan has no text until it has been through OCR, and an address broken across two lines is read as two fragments, so neither is linked.

Questions people ask

Why are the URLs in my PDF not clickable already?
Because a link in a PDF is an annotation - a rectangle with an action attached - and not a property of the text. Word and most design tools create them when you paste a URL, but export routes lose them, and a scan never had them: it has a picture of a web address. Automatic detection reads the text, finds the addresses and writes the missing annotations over them.
Can I link from one page of the document to another?
Yes. Draw a rectangle and give it a page number rather than a web address. The jump is written as an explicit destination that keeps the reader's current zoom level and lands at the top of the target page. For a whole table of contents, Edit bookmarks is usually the better tool - it gives the reader a side panel instead of clickable text.
How do I remove links from a PDF?
Two ways, and they do different things. Turning on replacing existing links deletes every link before writing whatever you have added, so it clears them all when you add nothing. Removing outbound links only takes out the ones pointing at the web, leaving the jumps between pages intact - which is what you want for a document going outside the organisation.
Some of my URLs are only partly detected. What is going on?
Almost always a line break. The detector joins the text runs within a line before it matches, so an address split across several runs on one line is found whole - but an address that wraps to the next line arrives as two fragments and neither looks like a URL on its own. Draw those by hand: one rectangle over each line, both carrying the same address.
Are the links checked or sent anywhere?
Neither. No address is resolved, fetched or validated, and the document is never uploaded - the text extraction and the annotation writing both happen in your browser. That does mean a typo in a printed address becomes a link with the same typo, so it is worth spotting the obviously broken ones in the list before saving.

Related tools