HCI Data Ltd
Obfuscate Your E-mail Address to Reduce Spam
Home Internet tools

We hate spam so much that we wrote the following script to help you avoid getting spam in the first place. This javascript program converts normal e-mail addresses into code that most, if not all spam-bots (robots that run programs that harvest e-mail addresses) were not decoding in 2005. If you use the generated codes you are likely to get a great deal less spam than if you put an e-mail address in a web-page in clear text (that is, not encoded). The javascript program to obfuscate an e-mail address is simple to use, just fill out two fields on the form, click the ENCODE button and copy the results into the HTML of a page on your site where you want your e-mail address to be used.

You enter the name you want to show as the link (for example: BobSmith). Then enter his e-mail address (for example: bobsmith@microsoft.com). Then click on the encode button to receive the encoded HTML that you cut and paste into your web site.

Protect your e-mail identity from spam:

Enter the name to show on link:

Enter the e-mail address:

Click the ENCODE button below to encode the above information.

Below is your encoded e-mail link:

Now just copy and past this into the HTML of your web page and it will be converted into a link that browsers will understand and most spam-bots will not!.

Obfuscate E-mail Address : Part II

Another tool you can use is JavaScript. Traditional mailto links are set up in the following way:

<a href="mailto:name@domain.com">Your Name</a>

When the user clicks on the link their default email tool is opened and 'name@domain.com' is entered into the send-to field. It is this format that the spider bot is programmed to recognise and collect. Using JavaScript you can achieve the same on-screen result in a manner designed to confuse the bot, therefore protecting your online privacy:

Use JavaScript to hide your address

user = 'name';
site = 'domain.com';
document.write('<a href=\"mailto:' + user + '@' + site + '\">');
document.write(user + '@' + site + '</a>');

Simply place this above script in the same position in your document as your normal mailto link. Replace name with your email name and domain.com with your domain name. There you have it, a simple solution to an online headache.

HCI Data Ltd is a member of the Federation of Small Businesses
Last Updated: Saturday, 23-Jan-2016
HCI Data Ltd.