npm Email Privacy: How to Hide Your Email Address

Your npm email address is public by default. It's visible on your profile and embedded in every package you publish. Spammers know this. Here's how to protect your privacy while still maintaining packages on npm.

The privacy problem

When you create an npm account, the email you provide becomes publicly visible in multiple places:

  • Your npm profile — visible at npmjs.com/~username
  • Package metadata — embedded in every version you publish
  • npm CLI output — anyone can run npm view pkg maintainers
Terminal
$ npm view lodash maintainers
[
'jdalton <john.david.dalton@gmail.com>',
'mathias <mathias@example.com>'
]

This makes npm a goldmine for spammers. Bots continuously scrape the registry, and many developers report increased spam after publishing their first package.

Email relay services

The solution is to use a relay (or alias) email address. These services create forwarding addresses that hide your real email while still delivering messages to your inbox.

SimpleLogin

Free: 10 aliases

Open-source email aliasing service, now part of Proton. Create unlimited aliases that forward to your inbox. Can also send from aliases.

Learn more →

Firefox Relay

Free: 5 aliases

Mozilla's email masking service. Integrates with Firefox browser for easy alias generation. Premium tier removes limits.

Learn more →

DuckDuckGo Email

Free: Unlimited

Privacy-focused email protection. Strips trackers from emails before forwarding. Generates unlimited @duck.com addresses.

Learn more →

iCloud Hide My Email

iCloud+ required

Apple's email aliasing for iCloud+ subscribers. Creates random addresses that forward to your iCloud email.

Learn more →

Recommendation: Use a dedicated alias just for npm. If spam becomes unbearable, you can disable that alias without affecting your personal email.

How to set up a private npm email

1

Create a relay alias

Sign up for a relay service (SimpleLogin, Firefox Relay, etc.) and create a new alias. Use something memorable like npm-packages@your-alias-domain.com

2

Update your npm email

Go to npmjs.com → Settings → Emails and add your new relay address.

Verify the new email by clicking the link npm sends to it (it'll be forwarded to your real inbox).

Set the relay address as your primary email, then remove your old personal email.

3

Update your npm CLI config (optional)

If you publish packages, update your local npm config to use the new email:

npm config set init-author-email "your-alias@relay.com"

This sets the default email for new package.json files you create.

Note: Changing your npm email only affects future publishes. Your old email remains in the metadata of previously published package versions. There's no way to change this retroactively.

Managing npm notifications

Using a relay email helps with spam, but it doesn't solve npm's notification problem. npm sends a "Successfully published" email for every package version you publish — and there's no way to disable it.

If you maintain a monorepo with 20 packages, that's 20 emails per release. Two options:

Option 1: Filter and archive

Set up an email filter to automatically archive npm notifications. See our guide to filtering npm emails for step-by-step instructions.

Option 2: Get a digest

npmDigest consolidates all your publish notifications into a single daily, weekly, or monthly email. Keep visibility into what's published without the inbox flood.

Start 14-day free trial

No credit card required. Only charged for months you use it.

Frequently asked questions

Is my npm email address public?
Yes. By default, the email address you use to register your npm account is visible on your public profile and in package metadata. Anyone can see it by viewing your profile or running 'npm view <package> maintainers'.
Can I hide my email on npm?
Not directly. npm doesn't offer an option to hide your email from your profile or package metadata. However, you can use a relay email address (like SimpleLogin, Firefox Relay, or DuckDuckGo Email) to keep your personal email private.
Why do I get spam after publishing to npm?
Spammers scrape npm profiles and package metadata to harvest email addresses. Since npm makes emails public, publishing packages can lead to increased spam. Using a relay address helps prevent this.
Can I change my npm email address?
Yes. Go to npmjs.com, click your avatar → Account → Email, and add a new email address. You can then set it as primary and remove the old one. Note that this won't update the email in already-published package versions.
Does npm send emails I can't opt out of?
Yes. npm sends 'Successfully published' notifications for every package version you publish, with no way to disable them. For monorepo maintainers, this can mean dozens of emails per release. You can filter these in your email client or use a digest service like npmDigest.

Related guides