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
- You write email addresses normally in your content
- When the page loads, emails are converted to HTML entities
- Browsers display the email normally (visitors see
contact@example.com) - Bots see encoded text (
cont...) - Most spam harvesters can’t decode the entities
Before (Source Code)
Contact us at contact@example.comAfter (Source Code)
Contact us at contact@example.comWhat Visitors See
Contact us at contact@example.comThe 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 Type | Protected? |
|---|---|
| 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 Type | Protection Level |
|---|---|
| Simple text scrapers | Excellent |
| Basic regex harvesters | Excellent |
| Sophisticated crawlers | Good |
| JavaScript-enabled bots | Limited |
While no method is 100% effective against all bots, HTML entity encoding blocks the vast majority of email harvesters.
Email Links Still Work
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
Mailto Links
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:sales...">sales...</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.
Get access to all 147 modules with a single license