Unspammable Email Link Script

Protect your inbox. This script hides your email address from automated harvesters and spam bots by breaking it apart in the code and reassembling it only when the page renders for a human visitor.

Protected Link Demo

Copy the Script

<script>
// Unspammable Email Link
var user = "yourname";
var domain = "yoursite.com";
var text = "Contact Me";

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

Frequently Asked Questions

Some highly sophisticated bots that render JavaScript (like Googlebot) can read it, but the vast majority of "harvester" bots are simple scrapers that only look at raw text. This script blocks 99% of spam lists.

You can add a class to the anchor tag within the JavaScript string. For example:
document.write('<a class="my-link" href=...');

Yes, but you should wrap the code in a reusable function (e.g., function writeEmail(user, domain) { ... }) so you don't have to copy-paste the logic every time.