Why the Number Sign (#) Changes to %23 in PDF URLs
Question details
The user wants to know why the number sign or hashtag symbol (#) in a hyperlink embedded within a PDF automatically converts to %23.

- Product
- Device & OS
- not provided
- Scenario
- Clicking or hovering over a hyperlink that contains a hashtag inside a PDF document.
- Observed behavior
- The number sign (#) in the URL is replaced by %23, which represents its percent-encoded hexadecimal value.
Verify the original destination URL in your browser to confirm whether the number sign (#) is being used as a fragment identifier (anchor) or if it is part of the actual file name.
Understand Standard URL Percent-Encoding
The conversion of '#' to '%23' is a standard internet protocol behavior designed to transmit URLs safely, not a software error.
The number sign (#) is a reserved character in URLs, generally used as a fragment identifier to point a browser to a specific anchor or section within a webpage. When URLs are processed by PDF readers or transmitted over the internet, these reserved characters undergo a process called percent-encoding.
In percent-encoding, the '#' symbol is translated into its hexadecimal value, which is '%23'. This prevents web servers and browsers from misinterpreting the URL structure. Because this is standard protocol, it preserves the link's meaning and functionality.
Click the hyperlink directly from your PDF document to see if it successfully directs you to the intended webpage.
Observe your browser's address bar once the page loads. Most modern browsers will automatically decode the '%23' back into a '#' and jump to the correct anchor on the page.
Edit the Hyperlink to Use a URL Shortener
If the encoded URL fails to load the correct destination on a specific server, replacing it with a shortened URL can bypass the issue.
Manage and Edit PDF Hyperlinks Easily with WPS Office
If you need to update, test, or replace broken links in your PDF documents, WPS Office provides a powerful built-in PDF editor. It allows you to seamlessly insert and modify URLs to ensure your documents function perfectly.
- 1. Open your PDF in WPS Office: Launch WPS Office and open the PDF file containing the hyperlinks you wish to check or edit.
- 2. Access the Edit tab: Click on the 'Edit' tab located in the top ribbon menu to reveal the PDF editing tools.
- 3. Select the Link tool: Click on 'Link' or 'Edit Link'. This will highlight all the clickable areas and embedded URLs in your document.
- 4. Update the URL destination: Double-click the specific link area, enter the correct web address in the prompt, and click 'OK' to apply your changes.

Frequently Asked Questions
Why do other characters like spaces change to %20 in my PDF URLs?
This is part of the same URL percent-encoding process. Spaces, question marks, and ampersands are considered unsafe or reserved characters in a web address. A space is encoded as '%20' so that web servers can process the URL without breaking.
Will a PDF hyperlink with %23 still open the correct webpage?
Yes, in the vast majority of cases. Modern web browsers are designed to recognize percent-encoded characters. When you click the link, the browser automatically translates the '%23' back to a '#' and navigates to the appropriate section of the page.
Can I stop my PDF editor from changing # to %23?
Generally, no. Percent-encoding is an internet standard, and most PDF creators automatically encode URLs to ensure compliance and prevent the links from breaking during web transmission. If this causes an issue with your specific link, using a URL shortener is the best workaround.




