The Search Resource
Stop SPAMers!
How To Hide E-mail Addresses
in HTML Using Javascript

The most common way SPAMers get e-mail addresses is by "harvesting" them from public web pages. Spambots harvest the web for email addresses as they search through the raw HTML code behind web pages. Many people have refrained from putting their email addresses on the internet, or have cloaked them in some way so that the robots will be confused and parse them as ordinary text. This works, but it blocks some useful functionality. Creating clickable e-mail addresses, for example, is destroyed by this method.

But if you put your actual e-mail address within the mailto link, the spammers will still be able to read it because it's in plain text.

There is a way to obscure email addresses from these harvesters and still keep email links intact. Here's how...


See For Yourself...That You Won't See

E-mail:


Clickable?

Link Text (Leave blank to use e-mail address as link text):




Code:
Robot-Safe Output:


As you can see, you can generate any e-mail link you want. It will be clickable, readable, and safe from spammers. How is this done? Simply, the e-mail address is converted into its corresponding character codes, which the end-user will restore when they load the web page. By simply converting an e-mail address into a string of underlying character codes, spammers can be stopped.