
Product
Socket for Jira Is Now Available
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.
Obfuscates inline HTML email addresses to protect them from bots and scrapers.
"All the secrets of the world worth knowing are hiding in plain sight."
— Robin Sloan
Obfuscates inline HTML email addresses to protect them from bots and scrapers.
GhostMail aims to provide the highest level of protection possible without introducing any friction for viewers.
*Disguise the payload. Disappear into the DOM ** *Vanishes* **
There are inherent limits to what can be achieved within these constraints. Sophisticated tools and AI-powered scrapers may still extract email addresses. However, GhostMail provides a meaningful barrier against the most common low- to mid-level scrapers.
npm install ghostmail
yarn add ghostmail
Strike swift. Encode deep. Leave nothing readable.
import ghostmail from 'ghostmail';
const email = 'example.email@gmail.com';
const obfuscatedEmail = ghostmail(email, 987654);
console.log(obfuscatedEmail);
/*
e⁠x⁠a​m​<span class="280381" aria-hidden="true" style="display:none !important;">3</span>p⁠l​e​.⁠e⁠m​a⁠i⁠l​@⁠g⁠m​<span style="display: none !important;" aria-hidden="true" class="280421">3</span>a​i⁠l​.​c⁠o​m​
*/
email (string) – The email address to obfuscate.seed (number) – A number for deterministic obfuscation.The seed randomizes the obfuscation pattern to make detection harder while ensuring consistency.
The same seed and email will always produce the same obfuscation, which is helpful for consistent builds and caching.
They cannot spam what they cannot see.
GhostMail obfuscates email addresses using:
@, .) to break simple regex-based scrapers.display: none;): Inserts invisible junk to further confuse bots.These techniques make it significantly harder for automated scrapers to extract an email while keeping the address readable and copyable for real users.
I’ve done significant testing but have not received enough thorough feedback to test all environments.
There's a large range of devices and methods for enabling accessibility and it's hard to be aware of all of them. I will swiftly address any that are reported to me in regards to these.
GhostMail offers a reasonable level of obfuscation, but it is not a foolproof solution. Consider the following:
I use GitHub as the primary public development spot:
https://github.com/alexstevovich/ghostmail
Every char a ghost.... every address a myth.
Licensed under the Apache License 2.0.
FAQs
Obfuscates inline HTML email addresses to protect them from bots and scrapers.
We found that ghostmail demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Product
Socket for Jira lets teams turn alerts into Jira tickets with manual creation, automated ticketing rules, and two-way sync.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.