Robert Spangler

UI/UX designer & front-end developer


Encrypt Mailto Links to Stop Email Spam

It’s easy to get spammed. One way to get spammed is to have email links on your websites because bots search through websites looking for <emailaddress>@<host>.<com>.

So, this is the best solution I came across. Type in your email address below and it will shoot back an encrypted mailto link for you to use. It is amazing, works great, and the results validate xHTML Strict.

The Input

The Results

35 Responses to “Encrypt Mailto Links to Stop Email Spam”

  1. Amy

    Robert, thank you for this great resource. I recently began noticing spam, so I figured the bots had finally trawled my site! It’s the little hacks like this that make life loads easier.

  2. phil

    Great solution! It open mail program but it leave subject link empty. Is there in adding subject inside html code?

  3. Elizabeth Bromstein

    Hi. I’m trying to encrypt an email to add to blog entries. But I’m too dumb to follow the instructions. Do Just cut and paste the code?

  4. Robert

    @Elizabeth Yes you can just copy/paste the code, I would just recommend the first input box (“Complete email link”) because that will take care of making the link for you.

    And, you’re not dumb, one possible issue you may run into is that depending on your blogging platform, your text editor might want to try and decrypt it for you after you post it.

    If that’s the case, you can have your web developer implement this into your theme —

  5. Tim Dawson

    It certainly works as a link, and my e-mail client duly opens (with a subject). But when I hover my mouse over the link I can see the plain text in the status bar, so won’t a bot see the same ?

  6. Nurionn

    Is there a possibility to get your code to encrypt an E-Mail-Adress? I’d like to create a little extension for my website, using the Yii Framework (…

    Of Course I’d share the result with you if you’re interested!

  7. Alex Luecke

    Is it me, or does converting to hex/decimal special chars does not seem to be offer any real protection? Sure it’s not human readable, but does not seem that hard for a bot to account for. This is in no way encryption.

    • Rob

      If you have any confirmation that this does not help, please share. I’m sure it is not full-proof, but it has proven successful where I’ve used it. This is also a post from 2007! If this isn’t the right fit for you, it may be worth considering a more complex JavaScript solution.

  8. Clemens

    I’ve been coming here for so many years, so many thanks for your work!
    Today it doesn’t seem to be working though and the console is throwing a bunch of 404s – could you please fix it again? Thanks so much!


Leave a Reply

  • (will not be published)

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

About Robert

I work with clients ranging from local small businesses and non-profits to large Fortune 500 companies.

If you think I'm the right guy for your project, please feel free to give me a shout.

I am a full-time freelance website designer and front-end developer from Baltimore, Maryland, currently living in Nairobi, Kenya.

I design and code for user experience on the web with special attention on mobile devices. I come from a background in eCommerce and lead generation, which I'm very good at. I spend most of my time personalizing and creating customized WordPress themes for clients. Other than designing websites I spend time with family, study, occasionally tweet, and rarely +.