PDF Editing Issues

Prevent Acrobat from Changing PDF URL Fragment # to %23

Huda QurayshiHuda Qurayshi Nov 2, 2026 868 views

Question details

The user needs to create a hyperlink in a PDF document pointing to a specific webpage section using a URL fragment (e.g., #people), but the PDF editor automatically encodes the hashtag as %23, causing the link to break.

How to Prevent Acrobat from Changing PDF URL Fragments from # to %23
Product
Adobe Acrobat
Device & OS
not provided
Scenario
Adding web links inside a PDF document that jump directly to anchored sections of a webpage.
Observed behavior
The PDF software automatically converts the '#' character in the destination URL to its encoded equivalent '%23', which prevents the link from successfully navigating to the designated page anchor.
Before you start

Verify that your destination URL is fully functional by pasting it directly into a web browser. Ensure you have the exact link copied, including the required 'http://' or 'https://' prefix.

Solution 1Recommended

Include the Full HTTP or HTTPS Protocol Prefix

Using the complete web address with the standard protocol prefix ensures that Acrobat correctly parses the link structure and reduces the chance of unwanted URL encoding.

Often, Acrobat attempts to fix or encode URLs that seem malformed. By providing an explicitly complete URL, the software correctly identifies the destination as a web address and is more likely to leave the URL fragment intact.

1
Select the Link Tool

Open your document in Acrobat, navigate to the 'Edit PDF' tools, and choose the 'Link' dropdown. Select 'Add/Edit Web or Document Link'.

2
Define the Link Area

Draw a rectangle over the specific text or image you want to turn into a hyperlink, and set the link action to 'Open a web page'.

3
Enter the Complete URL

In the URL field, type the full address starting with the protocol (e.g., https://www.yourwebsite.com/page/#people). The 'http://' or 'https://' prefix is strictly required.

Test the Link: After saving the document, open the PDF in a standard web browser (like Chrome or Edge) to verify the link directs properly to the anchor.
Seamless PDF Hyperlinking

Easily Add URL Anchors and Links with WPS Office

WPS PDF Editor provides a highly intuitive interface for adding web links to your documents. It correctly handles complex URLs, preserving URL fragments and anchors without unwanted %23 encoding issues, ensuring your destination links work perfectly right out of the box.

  1. 1. Open Your Document: Launch WPS Office and open your target PDF file in the WPS PDF editor.
  2. 2. Access the Edit Tools: Navigate to the 'Edit' tab located on the top ribbon menu.
  3. 3. Insert the Hyperlink: Click on the 'Link' button, choose 'Add/Edit Web Link', and draw a box over your target text.
  4. 4. Enter the URL Fragment: Paste your complete URL including the '#' anchor. WPS will safely preserve the exact formatting you provide without breaking the destination link.
Easily insert, manage, and edit hyperlinks in PDFs without encoding errors.Fully compatible with standard Adobe PDF formats and web viewing tools.Lightweight software that opens, edits, and saves large PDFs rapidly.Cost-effective and user-friendly alternative to expensive PDF editing tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why does %23 appear instead of a # in my PDF links?

The sequence '%23' is the standard URL encoding for the '#' character. Many PDF editors automatically encode special characters into URLs to ensure web-safety, but this can inadvertently break anchor links if the target server expects a literal hash symbol to jump to a page section.

Can I use Acrobat JavaScript to fix broken URL fragments?

Yes. You can bypass the standard web link tool by creating a custom link action. Choose 'Run a JavaScript' instead of 'Open a web link', and use the script: app.launchURL("https://www.yourwebsite.com/#people"); to execute the exact link without modifications.

Are URL fragments essential for standard website hyperlinks?

No. URL fragments (the portion of a URL following a # symbol) are only necessary when you need the browser to scroll down automatically to a specific heading, div, or anchor point on a webpage. For general links to the top of a page, they can be safely removed.

How do I accurately test if my PDF link is working correctly?

Because different PDF readers handle links differently, the best way to test is to save your completed PDF and open it using a standard web browser like Google Chrome or Microsoft Edge. Click the link and verify that the browser's address bar displays the '#' symbol and scrolls to the right section.