Prevent Acrobat from Changing PDF URL Fragment # to %23
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.

- 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.
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.
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.
Open your document in Acrobat, navigate to the 'Edit PDF' tools, and choose the 'Link' dropdown. Select 'Add/Edit Web or Document Link'.
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'.
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.
Escape the Hashtag Character Using Unicode
If standard link entry fails, you can force the software to preserve the hashtag by replacing it with its raw Unicode value.
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. Open Your Document: Launch WPS Office and open your target PDF file in the WPS PDF editor.
- 2. Access the Edit Tools: Navigate to the 'Edit' tab located on the top ribbon menu.
- 3. Insert the Hyperlink: Click on the 'Link' button, choose 'Add/Edit Web Link', and draw a box over your target text.
- 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.

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.




