Email Obfuscator

Automatically protect email addresses from spam bots by encoding them in HTML entities. Visitors see and can click normal email links, but bots harvesting your site see scrambled code instead of readable addresses.

Use Cases

  • Protect contact emails displayed on your website from spam harvesters
  • Reduce spam received at support@ and info@ addresses
  • Secure staff email addresses on team directory pages
  • Block automated scrapers from collecting your email addresses

How It Works

  1. You write email addresses normally in your content
  2. When the page loads, emails are converted to HTML entities
  3. Browsers display the email normally (visitors see contact@example.com)
  4. Bots see encoded text (cont...)
  5. Most spam harvesters can’t decode the entities

Before (Source Code)

Contact us at contact@example.com

After (Source Code)

Contact us at contact@example.com

What Visitors See

Contact us at contact@example.com

The encoding is invisible to human visitors.

Where to Find It

Location: The module works automatically. Simply enable it in Switchboard — no configuration needed.

What Gets Protected

The module encodes email addresses in:

Content TypeProtected?
Post content✅ Yes
Page content✅ Yes
Post excerpts✅ Yes
Text widgets✅ Yes
Comments✅ Yes

How Effective Is This?

Email obfuscation reduces spam by making it harder for bots to find addresses:

Bot TypeProtection Level
Simple text scrapersExcellent
Basic regex harvestersExcellent
Sophisticated crawlersGood
JavaScript-enabled botsLimited

While no method is 100% effective against all bots, HTML entity encoding blocks the vast majority of email harvesters.

The encoding doesn’t break email links:

Your content:

<a href="mailto:support@example.com">Email us</a>

What happens:

  • The link still works when clicked
  • Opens the visitor’s email client
  • Pre-fills the To: field correctly

If you use mailto: links, both the visible text and the href are encoded:

Input:

<a href="mailto:sales@company.com">sales@company.com</a>

Output (in source):

<a href="mailto:&#115;&#97;&#108;&#101;&#115;...">&#115;&#97;&#108;&#101;&#115;...</a>

Display: Normal clickable email link

FAQ

Will this completely stop spam?It significantly reduces spam from automated harvesters. However, determined spammers using advanced methods may still find addresses. Use this as one layer of protection alongside spam filters.
Does this affect email deliverability?No. This only affects how emails are displayed in your page source. It has no impact on sending or receiving emails.
Can visitors copy-paste the email address?Yes! When visitors copy the email from your page, they copy the decoded text. It pastes normally.
Does this work with contact forms?Contact forms don’t display email addresses publicly, so they don’t need this protection. The form submits to your email server-side.
What about emails in images?Emails in images aren’t affected (they’re not text). Image-based emails have their own protection but are less accessible.
Will this slow down my site?No. The encoding is extremely fast and adds negligible overhead to page rendering.

Combine email obfuscation with contact forms for maximum protection. Use forms for primary inquiries and obfuscated emails as backup.

This module works automatically — there’s nothing to configure. Just enable it and all email addresses in your content are protected.

PRO

Get access to all 147 modules with a single license

Upgrade to Pro