Docento.app
Notebook, coffee, and laptop on a desk
All Posts

How to Add Hyperlinks to a PDF

By The Docento.app TeamPublished Updated 5 min read
Try Docento's free PDF editorNo sign-up, 100% private — sign, annotate, and stamp PDFs in your browser.Open the editor

A clickable link in a PDF is not text. It is a rectangle. Understanding that one fact explains everything about how links behave in PDFs — why they break when you edit a document, why typing a URL does not make it clickable, and why some links work in one reader and not another.

How PDF links actually work

In the PDF file, a hyperlink is a link annotation: a rectangular region defined by coordinates on the page, paired with an action to perform when clicked. Usually that action is a URI action carrying a web address.

The critical point is that the rectangle and the visible text are completely independent objects. The blue underlined words you see are just glyphs drawn on the page. The clickable area is a separate rectangle that happens to sit on top of them. Nothing enforces that they agree.

This explains several behaviours that otherwise look like bugs:

  • Typing a URL as plain text produces no link at all. There is no annotation, so there is nothing to click. Some readers helpfully auto-detect URL-shaped text and make it clickable on the fly, which is why the same file behaves differently in different viewers.
  • The clickable area can drift out of alignment with its text if a document is edited, leaving a link that only responds slightly to the left of where it appears.
  • A link's rectangle can point somewhere entirely different from the text it covers. This is occasionally a design choice and occasionally a phishing technique — which is why you should hover before clicking links in PDFs from unknown senders.

The right way: link in the source document

Adding links to an existing PDF is awkward. Adding them before export is trivial. Whenever you have the source file, do it there.

Word, Google Docs, Pages. Select the text, press Ctrl+K (Cmd+K on Mac), enter the URL, and export to PDF. The link annotations are generated automatically.

Do use Export or Save as PDF, not Print to PDF. This is the mistake that costs people their links. The print pipeline renders pages as output and discards annotations — you get a visually identical PDF with every link dead. Always use the application's own PDF export.

InDesign, Illustrator, Affinity. Use the Hyperlinks panel and enable interactive elements on export.

LaTeX. Load the hyperref package; it converts \url{}, \href{}, and cross-references into working link annotations, including internal ones.

Markdown and static site generators. Standard link syntax survives into PDF through most HTML-to-PDF pipelines, including headless Chrome and wkhtmltopdf.

Adding links to an existing PDF

If the source is gone, you need a tool that creates link annotations. This is a genuine capability boundary, and free browser editors — Docento.app included — do not offer it. We can add text to a page; we cannot attach a URI action to a rectangle on it.

Tools that can:

  • Adobe Acrobat Pro — the Edit PDF → Link tool, which draws a rectangle and asks for a destination. The most reliable option.
  • PDF-XChange Editor — link creation is available on Windows, including in much of the free version.
  • LibreOffice Draw — free and cross-platform. It opens PDFs directly and can add hyperlinks, though complex layouts may shift on re-export, so check the result.
  • Scriptingpikepdf or PyPDF in Python can insert link annotations programmatically, which is the sane approach for adding the same link to hundreds of documents.

The pragmatic workaround, if none of those is available: add the URL as visible text with an editor. It is not clickable, but it is readable and copyable, and for a short address in a printed handout that is often enough. Keep it short — nobody retypes a hundred-character tracking URL.

Internal links and bookmarks

Two different navigation mechanisms get confused here.

Internal links are link annotations whose action jumps to another page in the same document, rather than opening a browser. Cross-references and tables of contents generated in Word or LaTeX become these on export.

Bookmarks — the outline shown in your reader's sidebar — are a separate structure entirely, not annotations on any page. They come from your document's heading styles when you export with "create bookmarks" enabled, an option that is off by default in some versions of Word and is the reason long reports so often arrive with an empty sidebar.

For any document over about ten pages, bookmarks do more for your reader than any number of inline links.

Test before you distribute

Links break silently, and you will not find out unless you look.

  • Open the exported PDF in an actual reader, not the preview inside the tool that made it.
  • Click every link. Every one — the broken one is always the one you assumed was fine.
  • Test in more than one viewer if it matters. Browser PDF viewers, Acrobat, and Preview handle annotations slightly differently.
  • Check mailto: links open a mail client with the right address.
  • Watch for links that only respond in part of their visible area, which indicates a misaligned rectangle.
  • If the PDF is going to print, remember that a link is invisible on paper. Anything important should have its address written out as well.

A security note

Because the clickable rectangle and its visible text are independent, a PDF link can display one address and go to another. Attackers use this. In any PDF from a sender you do not know, hover to see the real destination before clicking, and be suspicious of documents whose only content is an urgent instruction to follow a link. See are online PDF editors safe? for the wider picture on handling untrusted documents.

Related reading

Try Docento's free PDF editor

No sign-up, 100% private — sign, annotate, and stamp PDFs in your browser.

Open the editor

Related Posts