Automatic Email Protection

This page allows you to convert email addresses into an encoded form suitable for inclusion on a web site. The encoded addresses work just like normal mailto links, but are much harder for spam harvesters to read. For more information, see my introduction to anti-spam email encoding.

To use this page, simply enter email addresses into the input pane on the left below, one per line. There are two acceptable forms:

  1. Simple email address, e.g.
  2. An email address plus display name, e.g. Fred Bloggs <>

The latter is the normal format for quoting email addresses plus display name, so you should be able to copy and paste directly from your address book or similar. When encoded, the display name will appear to the website reader as the content of the mailto link, whilst the email address itself will be encoded as the target of the link.

Enter email addresses here:Encoded links:

After pressing the "Encode mail links" button you can highlight and copy the output in the right-hand pane above, and simply paste into your HTML code.

To use the encoded links, you must have the latest version of my email.js script file - you can download it here: email.js. Make sure the comment at the start of the file says version 5 or higher. You will also need to reference this file in the HEAD section of every web page that uses encoded links, like so:

<script language="javascript" src="/scripts/email.js"></script>

Be careful that the path to the email.js file is correct - in the example above I've assumed you've put it into a top-level "scripts" directory in your site.

Any problems, let me know on .

MBD August 2003