There are a lot of people who would like to put their email address on their website, but don't because there are worms and people who use the internet to harvest email addresses for the purpose of spam and the mass-mailing of worms and trojans.

These programs are intended to reduce this problem by assisting a user in obfuscating their address by use of HTML ASCII codes.

Using these codes, the HTML source would have, for an email address like, say, user@nowhere.com, these codes:

user@nowhere.com

But the user will still read user@nowhere.com.

This will make it less likely that a spider will read your email address successfully out of your HTML code, but your users will still be able to read it and mailto: links will continue to work!

The conversion algorithm is extremely simple. I basically noticed that an HTML ASCII code consists of &#x;, where x is the integer value of the character. Using C these values are really easy to get by converting a char datum to an int.

The original program is plain C intended for UNIX/Linux environments and can easily be compiled by typing gcc -o convert convert.c and executed with ./convert. You then type in what you want and press enter. I revised the program once and can't remember what I changed, but you get the idea and it does work (let me know if there's a bug).

Recently I became interested in learning to use Microsoft Visual C# .NET so I used this same algorithm in a simple C# program. Below is a screenshot.

Download Windows version.

Download Linux version.

Last updated 12 March 2007.
Share Feedback