Other PDF Issues

Fix PDF Links with Hash Symbols Failing in Safari

Natalie TaylorNatalie Taylor Nov 3, 2026 868 views

Question details

PDF hyperlinks containing a hash symbol (fragment identifier) fail to open in Safari, returning a 404 error.

How to Fix PDF Links with Hash Symbols Failing in Safari
Product
PDF
Device & OS
macOS / iOS
Scenario
Clicking a hyperlink inside a PDF document that points to a specific URL fragment.
Observed behavior
Safari encodes the hash symbol (#) as %23, which breaks the URL and causes a 404 error, whereas other browsers like Chrome and Edge open the link correctly.
Before you start

Verify that the destination URL actually exists and works correctly when pasted directly into a web browser address bar.

Solution 1Recommended

Apply URL Workarounds for Safari PDF Viewers

Since this is an inherent issue with Safari's built-in PDF viewer, using alternative linking methods can prevent the 404 error.

Safari's native PDF plug-in incorrectly URL-encodes fragment identifiers (the hash symbol) as %23. Because this is a browser-level bug, the most reliable fix is to modify the links within your PDF document.

1
Remove the URL fragment

Edit the hyperlink in your PDF editor to point to the base URL without the hash symbol (e.g., remove '#top').

2
Implement a redirect URL

Create a standard URL on your website server that automatically redirects visitors to the URL containing the fragment identifier, then link to this clean URL in your PDF.

3
Report to Apple

Since Safari's native PDF plug-in handles URL encoding incorrectly, report this bug through Apple's official feedback portal so their developers can address it in future updates.

Browser Compatibility: These same links will function normally without errors in Chrome, Edge, and dedicated PDF readers like Adobe Acrobat and WPS PDF.
PDF Editing Solution

Modify Your PDF Hyperlinks with WPS PDF

Easily update or replace broken PDF hyperlinks using WPS PDF to ensure your documents work flawlessly across all browsers, including Safari.

  1. 1. Open your PDF: Launch WPS Office and open the PDF document containing the problematic hyperlinks.
  2. 2. Access the Edit tab: Navigate to the 'Edit' tab located on the top toolbar of the WPS PDF interface.
  3. 3. Select the hyperlink: Click on 'Link' and then select the specific hyperlink that is causing 404 errors in Safari.
  4. 4. Update and save: Modify the link destination to remove the hash symbol or replace it with your clean redirect URL, then save your document.
Easily insert, edit, or remove PDF hyperlinks in secondsFully compatible with standard PDF and Microsoft Office formatsLightweight, fast, and feature-rich PDF viewer and editorCross-platform support for Windows, Mac, iOS, and Android
microsoft office alternative - wps office

Frequently Asked Questions

Why do PDF links with hash symbols work in Chrome but not Safari?

Safari's native PDF plug-in incorrectly URL-encodes the hash symbol (#) as %23 when passing the link from the PDF to the browser address bar, breaking the destination URL. Chrome and Edge parse the fragment identifier properly without encoding the hash symbol.

Can I force Safari to read the fragment identifier correctly?

Currently, there is no direct setting in Safari to change how its native PDF viewer handles URL encoding for fragment identifiers. The best approach is to modify the link in your PDF or advise users to open the PDF in a dedicated reader like WPS PDF.

How do I create a redirect URL to bypass this Safari PDF bug?

You can set up a URL redirect (such as a 301 redirect) on your website server. The PDF hyperlink will point to a clean URL (e.g., yourwebsite.com/redirect), which the server then automatically redirects to the final URL containing the hash symbol (yourwebsite.com/page#section).

Will this issue affect users opening the PDF on iPhones or iPads?

Yes, since iOS and iPadOS also rely on Safari's WebKit rendering engine, users opening the PDF in the native browser or mail app may experience the exact same 404 error when clicking links with hash symbols.