New guide: how to warm up a dedicated IP without hurting your reputation. Read now →
Log in
MigoSMTP
SMTP and APIUpdated 26 Oct 2026

Are Email Addresses Case Sensitive? What the Standard Says and What to Do in Practice

The standard allows the local part to be case sensitive while the domain is not, but nearly every provider ignores case. How to store, compare, deduplicate and send to addresses safely, and the edge cases that bite.

MO
Written by Mateus Oliveira
Senior SMTP and MTA Engineer
Reviewed by Aarav Mehta
  • Published20 Nov 2024
  • Read time6 min
  • Length1,286 words
Share this guide

A user signs up as [email protected] and later logs in as [email protected]. Should those be the same account? Should a marketing list treat them as one subscriber or two? The answer depends on a gap between what the email standards allow and what mail systems really do, and a surprising number of bugs, duplicate accounts and failed password resets come from getting it wrong.

This article separates the formal rule from real-world behaviour and gives a safe policy for handling address case in your own systems.

Domain partCase insensitive: Example.com and example.com are the same domain
Local partThe standard says it may be case sensitive, but virtually all large providers treat it as insensitive
Safe policyPreserve what the user typed for display and sending; compare and deduplicate on a lower-cased form
Edge caseA tiny number of private servers do distinguish case, so never rewrite the address you send to

What the standard says

The email address specification divides an address at the final @ sign. The domain on the right is a DNS name, and DNS names are case insensitive by definition. The local part on the left is defined as opaque to everyone except the receiving system. The core mail standard (RFC 5321) states that the local part must be treated as case sensitive by senders and relaying servers, because only the destination mail host knows how it interprets that string. It recommends that receiving hosts avoid making case significant, so that people can use addresses in either case.

In other words, the rule is a cautious one: do not assume the local part is insensitive when you are a sender, but if you run a mail server, make it insensitive.

What happens in the real world

In practice, major mailbox providers deliver SAM@domain, Sam@domain and sam@domain to the same mailbox. Most organisations that run their own mail systems configure them the same way, since a case-sensitive mailbox would cause constant misdelivery. You will almost never meet a mail system that treats upper- and lower-case local parts as different people. The exceptions are small, self-hosted or legacy systems where each variant is deliberately mapped to a different mailbox, or where a mailbox name is generated from a case-sensitive file system.

PartStandardTypical behaviourSafe handling
Domain (after @)Case insensitiveCase insensitiveLower-case it for storage and comparison
Local part (before @)May be case sensitive; receivers advised not to make it soCase insensitive at almost every providerPreserve as typed when sending; compare in lower case
Plus tags and dotsPart of the local part; meaning is provider-specificMany providers ignore the tag after a plus sign; some ignore dotsDo not strip them for delivery. See plus addressing
Quoted local partsAllowed in the standard, can contain unusual charactersRarely accepted by public formsReject or allow deliberately
International charactersAllowed under extended standardsSupport variesTest before accepting. See UTF-8 in email

Where case causes real problems

  • Duplicate accounts. If your database compares addresses exactly, the same person can register twice with different capitalisation and split their order history.
  • Failed logins. A user who registered with a capital letter and types lower case, or the reverse, is told that the account does not exist.
  • Password reset mismatches. A reset request is matched against a stored address in a different case and silently fails.
  • Duplicate sends. A list with [email protected] and [email protected] mails the same person twice, which raises complaints.
  • Suppression gaps. A person unsubscribes as lower case; your list still holds a mixed-case copy that you keep mailing. See suppression lists.
  • Import failures. Unique indexes on case-sensitive columns reject some rows and accept near-duplicates.
  • Spreadsheet mangling. Auto-capitalisation in office tools can turn a typed address into a capitalised one.

A safe policy for your system

  1. Keep two values. Store the address exactly as entered for display and for the envelope when you send. Store a normalised copy (lower-cased) in a separate indexed column for comparison and uniqueness.
  2. Normalise the domain. Lower-case the domain part always. It cannot be case sensitive.
  3. Lower-case the local part for comparison only. Treat two addresses as the same person when their lower-cased forms match.
  4. Trim whitespace. Remove leading and trailing spaces and reject internal spaces.
  5. Do not rewrite the address you send to. Sending to the original keeps you correct for the rare case-sensitive server.
  6. Do not strip dots or plus tags for delivery. Optionally strip them for fraud or duplicate-account checks, understanding that this is a policy, not a standard. See plus addressing.
  7. Apply the same normalisation everywhere: signup, login, imports, suppression and unsubscribe lookups, webhook processing and API calls.
-- MySQL: normalised column with a unique index
ALTER TABLE users
  ADD COLUMN email_norm VARCHAR(254)
    GENERATED ALWAYS AS (LOWER(email)) STORED,
  ADD UNIQUE KEY uq_users_email_norm (email_norm);

// PHP: build the comparison key
$norm = strtolower(trim($email));
[$local, $domain] = explode('@', $norm, 2);

Be careful with non-ASCII letters. Simple lower-casing is language dependent, and some languages have special rules. Use a Unicode-aware function if you accept international addresses, and consider rejecting addresses you cannot normalise reliably.

Database collation and uniqueness

Many databases compare strings case-insensitively by default, depending on the collation. That can hide the problem in development and reveal it in production on a different server or after a migration. State the collation you rely on, write a test that inserts two addresses differing only in case, and prefer an explicit normalised column over an implicit setting. See address-related SMTP errors for what happens when a malformed address reaches a server.

Handling case in imports and integrations

  • Normalise before deduplicating a file, not after, and report how many rows were merged.
  • Keep the original row for audit if you need to explain a merge.
  • Apply the same normalisation to suppression files so a removal in one case covers all.
  • When matching webhook events to contacts, use the normalised key. See delivery event webhooks.
  • When reading bounces and complaints, the recipient address in a report may be in a different case from what you stored.

Case and authentication records

Case rules also apply to DNS records. Domain names in SPF, DKIM selectors and DMARC records are compared without regard to case, and tag names in DMARC are lower-case by convention. For tooling, lower-casing a domain before lookup is always safe. See authenticating your sending domain.

Testing your own handling

  1. Create an account as [email protected].
  2. Try to log in as [email protected].
  3. Request a password reset using each variant.
  4. Subscribe both variants to a list and confirm one record results.
  5. Unsubscribe one variant and confirm both are suppressed.
  6. Send a message to the original and check that the envelope recipient is unchanged.
  7. Import a file that mixes cases and check that it merges correctly.

Frequently asked edge cases

  • Does the domain ever need to be mixed-case? No. Lower case is the convention.
  • Can I force everything to lower case? You can for comparison. For delivery, keep the original unless you control the receiving side.
  • What about display names? The name in quotes before the address is free text and case is preserved. See sender names.
  • Do blocklists care about case? Domain-based lists compare case-insensitively.

Email addresses are in theory case sensitive on the left of the @ and not on the right, but in practice you can treat them as case insensitive for almost every purpose. Keep the original for display and sending, compare and deduplicate on a lower-cased copy, apply the same rule everywhere and test the edges. That approach avoids duplicate accounts and failed logins without breaking the rare system that cares.

Check addresses before they enter your system Validate syntax and domain automatically.

Open the email validator

References and further reading

Frequently asked questions

Are email addresses case sensitive?

The domain is not. The local part may be under the standard, but almost all providers ignore case, so treat addresses as case insensitive for comparison.

Should I lower-case emails before saving?

Store the original for display and sending, and keep a lower-cased copy for uniqueness and lookups.

Will [email protected] and [email protected] reach the same inbox?

At virtually every provider, yes. A very small number of private servers may treat them differently.

Do dots and plus signs matter?

They are part of the local part. Some providers ignore dots or plus tags, but others do not, so never strip them for delivery.

How do I prevent duplicate accounts from case differences?

Add a unique index on a normalised lower-case column and apply the same normalisation to every lookup.

Topics#email addresses#case sensitivity#normalisation#rfc 5321#validation
Was this guide helpful?Your answer helps us improve our documentation.

Start sending in minutes.

Create an account, add your domain and send your first email.

Get started Talk to sales