An Internet Protocol address (IP address) is a numerical label assigned to each device connected to a computer network that uses the Internet Protocol for communication. An IP address serves two main functions: host or network interface identification and location addressing.
IP addresses are usually written and displayed in human-readable notations, such as 18.104.22.168 .
The reason to hide your IP address is simply for more privacy and to prevent misuse of your personal information. Whenever you access a website, the server you connect to logs your IP address and attaches it to all the other data the site can learn about you: your browsing habits, what you click on, how long you spend looking at a particular page. They then sell this data to advertising companies who use it to tailor ads straight to you. This is why ads on the internet sometimes feel oddly personal: it’s because they are. Your IP address can also be used to track your location, even when your location services are turned off.
See Also :
- Log4j2: How to Mask Logs Personal/Confidential/SPI Information
- How to Mask JSON Confidential/Personal Information in logs :JAVA
- How to mask JAVA Object confidential/personal information in logs while Printing
- How to MASK XML Confidential/Personal Data : JAVA
- How to mask Personal/Confidential Information on web page
IP (Internet Protocol) Masking Example
Here considering, IP address is represent as above. By masking will hide all digits except dot (.) . For example, IP address is 22.214.171.124 than after mask will display as XXX.XX.XXX.XX .
Create a text box on your page with below html.
<input type="text" id="txtIP">
Java Script/JQuery Changes
Copy below java script in your head section of page.
This masking example is created considering standard length of text size and formatting of text field, that can vary according to organizations. If your organization having different format and text size modify source code according to your need. If you are facing any issue drop a comments will try to connect as soon as possible.
Download Source code
To download the source code of this example, click on below given download link.
Drop me your questions in comments section.