Title: Encode your email address

Categories: Administration, JavaScript, Mail

SubCategories: Email

Source: Juan C. Rodriguez

Goto www.v-and-m.com

. Email Address Encoder - Hide your webpage email address from spam spiders and virus spoofers

The purpose of this page is to give you the ability to display your email address on your page without worrying that it will get picked up by an email spammer.

There is a misconception that email spammers go into your computer to steal your email address. This is actually not the way they usually do it. They do it is by scanning websites in order to find email addresses.

The people who collect these email addresses actually never go on any website themselves to find your email address. This process would take too long for a person to do it. What they do instead is create computer programs, called "bots", that automatically search websites to find email addresses. Once they find one, they copy it and use it to send you junk email.

This program I have written encodes your email address in such a way that people looking at your site do not see anything different, but a bot looking for your email address cannot see it. Click here for instructions and here for FAQ.

NOTE: You must CLICK ON THE BUTTON below the email input field to encode your email address. PRESSING ENTER WILL NOT WORK.

Option 1:
Plain Email Link
Option 2:
Customized Display
Add descriptive comment tag.

Encode text but do not create link.

(** See Instructions for explanation **)

(** Pressing ENTER will not work **)


If you don't understand these instructions, just try the encoder out with the fake email address already entered in there.

  1. Choose the look of the link by clicking on the button next to Option 1 or Option 2.  
  2. Check the "Add descriptive comment tag" box if you would like to add an invisible comment tag to your link.
    • What this will do is add an invisible comment (viewable only to you while you are editing the page) that tells you exactly what the encoded link looks like and what the link points to. Since the link will be encoded, you will have trouble telling what the link is when you are editing the page.

      Don't forget that if you don't like what the descriptive comment tag says, or if you think it says too little or too much, you can just manually edit it. Just don't delete the container tags <!-- and -->.

  4. Check the "Encode text but do not create link" box if you just want to encode the email address but you don't want to actually create a link.
    • Some people prefer to have their email address displayed not as a link but as something like my (AT) email (DOT) address or my "AT" REMOVETEXTSPAMSUCKS email "DOT" address. This does make your site look slightly unprofessional, especially if the link is not active, i.e. one can't just click on the link to email someone. However, if you are encoding your email address for a page about your cat, you REALLY shouldn't care about that. In fact I would advise that you do encode your link this way if you own such a site. If you have visited this site before, you might note that I changed all links to my real email address this way.
  6. Click on the button to encode your link. (** Pressing ENTER will not work. You must click on the button. **)
  7. Sit back for approximately 3 seconds while your computer creates your email address.
    • Once you click on the button, the program will first write the code that you will use to display your email address on your website safely. Next, the program will create a new window for you that will show you exactly what the human reader sees and what the bot sees. If you have popups blocked, this second page might get blocked. You might be able to deactivate your popup blocker for a few seconds so that you can see the window.

[Back to top]


  1. How does this site work?
    • If you mean nontechnically:
      What this site does is convert the letters and symbols in your email address into its corresponding ASCII index. The browser that the viewer is using has the ability to convert the ASCII indices back into the readable form for the human reader. The email address remains invisible to any bots trying to find an email address on your site.

      If you mean technically:
      This site uses very simple code. It's simple enough for a non-programmer to write it. I do not keep its source code a secret. You can look at it by clicking on "view" -- "source" on Internet Explorer, or a similar way on most other browsers.

  2. What is ASCII?
    • ASCII (pronounced ask-ee) is a very standard system that computers use to index every character that your computer can display. ASCII indices are useful because they allow you to display characters not found on your keyboard (like ¢£¤¥§) . Since every browser recognizes the ASCII indexing, you can write your entire page just using the ASCII index for every character on your page (although you probably won't want to).
  3. So why does my email address stay invisible to bots?
    • While the person viewing your page uses some sort of browser to view your page, bots do not. They look directly at the source code for your page without ever looking at the display. Since they do not see an email address, they are not able to copy it and use it to spam you.
  4. So why doesn't the bot just convert my email address back into the displayed format and copy that?
    • To be honest, an extremely small amount do. The reason is that almost no one tries to mask their email addresses from bots in any way. Also those who are smart enough to mask their email address from bots do not all use the same email address masking method As a result, a bot, and specifically the person who made the bot, who even tried to find email addresses by trying to find addresses hidden in our specific format would not find very many. Since their goal is quantity, they probably do not search for email addresses encoded this way.

      Incidentally, I created this page in early 2003, and I posted my full but encoded email address on this page as an active link. This page did not generate a single bit of junk email for me.

  5. I noticed that your descriptive comment tag says "ENCODED LINK". Won't the bot know that the link is my email address, and then know that it can decode it?
    • No, for the same reason.
  6. Do you retain a copy of my email address?
    • No. You are free to examine the source code for this site.

[Back to top]