Add

Lorem ipsum

Lorem ipsum

A
A
A
No-code

0 views

4 min

How to Obfuscate an Anti-Spam Email in Webflow

Learn how to protect your email address from spam bots in Webflow with Base64 encoding.

In this tutorial, Sandro, cofounder of Gemeos Webflow agency, shows you how to display an email address on your Webflow site without making it readable by spam bots.

Example

Decoded, clickable email on load

In the HTML: aGVsbG9AZ2VtZW9zLndm

Loading...
Decoding...
AttributeElementValue
data-emailSpan or DivEmail encoded in Base64
textContentInjected by JSDecoded email, visible to humans
onclickInjected by JSmailto: triggered on click

Understanding the problem

Spam bots crawl the web looking for email addresses in the HTML source code. A mailto: link or a plain-text email in your HTML will get collected within hours and added to spam lists. Obfuscation means hiding the email in the HTML so humans can see it, but bots can't.

1. Encode your email in Base64

In your browser console (F12), type:

btoa('hello@gemeos.wf') // Returns: 'aGVsbG9AZ2VtZW9zLndm'

Copy the result. That's your encoded email.

2. Add the element in a Webflow Embed

In an Embed, paste this HTML and replace the value of data-email with your encoded email:

Loading...

3. Add the script in Footer code

The script decodes the email when the page loads and makes it clickable.

(function() {
document.querySelectorAll('[data-email]').forEach(function(el) {
var encoded = el.dataset.email;
var email = atob(encoded);
el.textContent = email;
el.addEventListener('click', function() {
window.location.href = 'mailto:' + email;
});
el.style.cursor = 'pointer';
});
})();

good to know

Base64 encoding isn't encryption: a determined human can decode it easily. The goal is only to outsmart automatic crawling bots that read raw HTML. In practice, this technique cuts spam by 90%. For maximum protection, pair it with a contact form instead of a direct email.

Conclusion

Base64 obfuscation is the simplest and most effective way to protect an email on a Webflow site. Use cases:

  • Contact pages with a displayed email
  • Footers with company contact details
  • Team pages with employee emails

Click the email to open your mail client

Contact

Loading...

Good to know

Heading

Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse varius enim in eros elementum tristique. Duis cursus, mi quis viverra ornare, eros dolor interdum nulla, ut commodo diam libero vitae erat. Aenean faucibus nibh et justo cursus id rutrum lorem imperdiet. Nunc ut sem vitae risus tristique posuere.

Lorem ipsum dolor sit amet consectetur.

Lorem ipsum dolor sit amet consectetur. Aliquam orci sagittis dignissim sapien praesent donec.

Lorem ipsum

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.

Published on

You might be interested in these tutorials

Similar tutorials

SEO / GEO

5 min read

5 views

How to Set Up a Redirect in Webflow? (2026)

Updated on 19.12.2025 by Sandro DA SILVA

SEO / GEO

5 min read

5 views

Add structured data to your Webflow site?

Updated on 21.08.2025 by Sandro DA SILVA

No-code

5 min read

5 views

How to Obfuscate a Link in Webflow

Updated on 23.04.2025 by Sandro DA SILVA

Let’s f*****G GO !!

Ready to launch
Your business?

Alexandre

Max

Enora

Bryan

Cannelle

Tiphaine

You'll :heart: our collaboration...