No. 06 · Email obfuscator
Email obfuscator
Put your address on a web page without leaving it as plain text for every scraper to collect. Six methods, each with a live preview, the code to paste, and a straight answer on what it does and does not stop.
None of these methods stops every bot. They make your address harder to collect automatically, which cuts down on spam, but anything a browser can show, a determined scraper can read.
How email obfuscation works, and its limits
Address harvesters crawl the web looking for text shaped like name@domain and mailto: links. Obfuscation stores the address in a form that browsers still display correctly but that a naive pattern match misses. Enter your address, pick a method and copy the snippet into your page's HTML.
Choosing a method
- Decimal or hex entities are the simplest drop-in: the link works and looks normal, but any HTML parser decodes entities automatically.
- Percent-encoded mailto hides the address inside the link target; bots that URL-decode links still read it.
- Contact link never shows the address as text at all, which stops copy-paste collection but also stops visitors copying it.
- CSS direction trick fools parsers too, but the result is not clickable and reads backwards to screen readers and when copied.
- Assembled by script keeps the address out of the HTML entirely; harvesters that run a real browser still see it, and visitors without JavaScript get your fallback link.
If spam is a serious concern, a contact form or a separate address you can retire later beats any encoding trick. The alias generator can help with the latter.
Questions
Will this stop all spam?
No. Obfuscation only raises the effort for automated harvesters. Determined scrapers decode entities, URL-encoding and even run JavaScript. Combine it with a good spam filter, or use a contact form or a separate address for your website.
Which method should I use?
For most sites, the contact link or the script method is a sensible balance: visitors get a normal clickable link, while simple harvesters see neither a readable address nor a plain mailto link. Avoid the CSS direction trick if accessibility matters, because screen readers read it backwards.
Does obfuscation hurt accessibility?
Entity and percent encoding are invisible to people and screen readers. The CSS direction trick is the exception: the text is stored backwards, so screen readers and copy and paste get it reversed.