Email Address Encoder

Junk email (a.k.a. spam) is a part of everyone's life if they ever put their email address on the web. For HTML authors, site admins, and for people who want a little credit on the page that they put online, it is a constant problem. You want to include your email address on the page, but you don't want your email address to be harvested by spambots.

The best thing you can do is encode your email address so that browsers can see it and spambots can not. This is what this tool attempts to do. I have created two different versions of the address encoder. Please pick the one that is appropriate:

Simple - Easy, quick, effective.
Custom - For really technically-minded people.
HTML Encode - Encode any text or HTML code that you want (power users only)
  • French version - Thanks to Pascal for translating this email address encoder!

These tools do not steal your email addresses. Nothing is sent back to my server, and everything runs in JavaScript in your browser. If you don't believe me, check out this independent review of a mirror the tools provided here. Keep in mind that this is not the end-all. There are other solutions out there, such as:

  • Java applet that shows the address and lets you click on it, but will foil spambots because they don't have a Java interpreter.
  • CGI scripts to send you mail directly without ever giving your address out -- make sure you don't specify the target email address in the feedback form!
  • A form button that will pop up a javascript window.
  • Generic JavaScript that will decode your address and forward you to the proper mailto: link.
  • A public guestbook/forum.

Remember -- creativity is the key when playing against spammers. They eventually adapt their techniques in order to make another $.05. That's why there is no single solution. If there is ever a single awesome way of doing this, then spammers will adapt their programs and we'll all need to find another method. So, if you like something you see, you may want to alter it just a bit so that spammers have a harder time reaping your email address.

This program can be further enhanced to do the following neat ideas:

  • Work with imagemaps and links better (you can use it now with imagemaps -- see these instructions).
  • Make the JavaScript put up a link that, when clicked, will pop open a window and automatically roll-over to the right email address.
  • Generate the code necessary for a form button that will take appropriate action when clicked.
  • Generate code for a java applet to display your email address.
  • Use this PHP code to make any email addresses on your site encrypted. It's the same stuff I use on my site.

And here's a few links that I found useful.

  • Email Encoder - A lot more on using links to call JavaScript functions that take your browser to the email link.
  • Experiences with using Javascript ... - Lots of great information. Just don't use window.navigate(); instead use window.location.replace().
  • CSS Methods - Alternate methods of hiding an email address, primarily using CSS. They don't actually make links.
Octophobia - Fear of the figure 8. Tyler Akins <>
Legal Info