Skip to main content

email-normalize

A Python 3.11+ library for normalizing email addresses by stripping mailbox-provider-specific behaviors such as plus addressing (foo+bar@gmail.com) and period ignoring (f.o.o@gmail.com).

Version Status Coverage License

Installation

pip install email-normalize

Usage

Synchronous

import email_normalize

result = email_normalize.normalize('f.o.o+bar@gmail.com')
print(result.normalized_address)  # foo@gmail.com
print(result.mailbox_provider)    # Google
print(result.mx_records)          # [(5, 'gmail-smtp-in.l.google.com'), ...]

Async

For use within an asyncio application, use the Normalizer class directly:

import asyncio

import email_normalize


async def main():
    normalizer = email_normalize.Normalizer()
    result = await normalizer.normalize('f.o.o+bar@gmail.com')
    print(result.normalized_address)

asyncio.run(main())

The Normalizer maintains a LFRU cache of MX lookups, making it efficient for batch processing.

Without DNS Lookups

Use skip_dns=True to normalize against well-known domains without performing MX record lookups:

result = email_normalize.normalize('user+tag@gmail.com', skip_dns=True)

This mode uses a static domain map and will not detect providers for custom domains.

Normalization Rules

Provider Plus Addressing Strip Periods Local Part as Hostname
Apple x
Fastmail x x
Google x x*
Microsoft x
ProtonMail x
Rackspace x
Yahoo
Yandex x
Zoho x
  • Plus Addressing: Strips everything after + in the local part
  • Strip Periods: Removes . from the local part
  • Local Part as Hostname: Extracts the subdomain as the local part (Fastmail custom domains)

* Google strips periods only for consumer Gmail addresses (gmail.com and googlemail.com). Google Workspace custom domains route through the same MX servers but treat periods as significant, so periods are preserved for them (plus addressing is still stripped).

Documentation

Full documentation is available at gmr.github.io/email-normalize.

Metadata

Release files for email-normalize 3.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for email-normalize 3.1.0
File Size Uploaded Provenance Actions
email_normalize-3.1.0.tar.gz 68.0 kB With provenance Details for email_normalize-3.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for email-normalize 3.1.0
File Interpreter ABI Platform Actions
email_normalize-3.1.0-py3-none-any.whl Python 3 none any Details for email_normalize-3.1.0-py3-none-any.whl

Total release size: 75.8 kB

Release files / email_normalize-3.1.0.tar.gz

Download URL email_normalize-3.1.0.tar.gz
Size 68.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d226bed0eddb1aba2b02bd007292e95c6ca554751402c7a8821fcbb0005e4e40
BLAKE2b-256 checksum
How to use checksums
0220cf96d09bfd1b5c247e4179da7412e2bcc04a1f288c6efbd5f913262de4f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Release files / email_normalize-3.1.0-py3-none-any.whl

Download URL email_normalize-3.1.0-py3-none-any.whl
Size 7.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
6a1bf330e021ab1b119603f057b0791ca473d56a6cdf2bab0968414b4e228d12
BLAKE2b-256 checksum
How to use checksums
8c4540140e74dce9c513e7192c611bf25e492251ceed3b411e4a1eb244e330b7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

Security for email-normalize 3.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for email_normalize-3.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jun 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page