Capital letters in email addresses don't matter to mail servers, but they can matter to you

Email addresses are case-insensitive at the server level. This means user@example.com, User@example.com, and USER@EXAMPLE.COM all reach the same inbox. The mail server treats them as identical. However, the part before the @ sign — called the local part — is technically case-sensitive according to email standards, even though most mail providers ignore the difference in practice.

The practical result: you can type your email address however you want, and it will work. But this doesn't mean capital letters are truly irrelevant. They matter in specific situations where you're configuring systems, storing credentials, or matching strings exactly in code.

Key Takeaways

  • Mail servers treat capital and lowercase letters as the same address, so john@example.com and JOHN@example.com reach the same inbox.
  • When you configure SMTP or IMAP, use the exact capitalization your email provider shows you, because some systems do exact string matching during authentication.
  • In code or scripts, normalize email addresses to lowercase before storing or comparing them to avoid duplicate records or failed lookups.
  • Password managers and form autofill sometimes preserve the capitalization you originally entered, which can cause confusion if you later type it differently.

Why mail servers ignore capitals but standards say they shouldn't

The SMTP and IMAP standards technically define the local part of an email address (everything before the @) as case-sensitive. This means a mail server could theoretically treat john@example.com and JOHN@example.com as two different addresses. In practice, almost no mail provider does this. Gmail, Outlook, Yahoo, and most corporate mail systems normalize everything to lowercase internally.

The domain part (everything after the @) has always been case-insensitive in practice. Domains are handled by DNS, which treats all letters as lowercase. So example.com and EXAMPLE.COM are always the same.

The gap between the standard and reality creates a false sense of safety. You can type your address however you want and receive mail. But when you're configuring a mail client or writing code that connects to a mail server, the system you're configuring might not be as forgiving.

When capital letters cause problems in SMTP and IMAP setup

Mail clients like Thunderbird, Outlook, or Apple Mail ask you to enter your email address during setup. If you type John@example.com but your account is actually registered as john@example.com, the client will still connect — the mail server accepts both. But some mail servers, particularly older ones or those with strict authentication rules, may reject the login if the capitalization doesn't match exactly what's in their user database.

This is especially common with corporate mail systems or self-hosted mail servers. If you're setting up IMAP or SMTP for a work email address, use the exact capitalization shown in your company's documentation or IT setup guide. If you're unsure, ask your mail provider or IT department for the canonical form of your address.

Git and other developer tools that store credentials in config files can have the same issue. If you configure Git to use an email address with capitals, and later a script or tool tries to match it against a lowercase version, the comparison will fail even though both reach the same mailbox.

How to handle capitals in code and databases

If you're writing code that accepts, stores, or compares email addresses, always convert them to lowercase before saving or checking them. This prevents duplicate records and failed lookups. Most programming languages have a straightforward method: in Python it's email.lower(), in JavaScript it's email.toLowerCase(), and in SQL you can use LOWER(email_column) in your WHERE clause.

When you display an email address back to a user, you can show it in whatever form they originally entered it — that's fine for readability. But for any internal logic, comparison, or storage, normalize to lowercase. This is especially important if you're building a system where users might sign up with john@example.com and later try to log in as JOHN@example.com.

If you're working with APIs that accept email addresses as parameters, check the API documentation. Most modern APIs are forgiving, but some older systems may require exact matching or lowercase input.

Password managers and autofill can preserve capitalization

Password managers like 1Password, Bitwarden, and LastPass store the email address exactly as you entered it. If you originally signed up with John@example.com, the password manager will autofill that capitalization every time. This usually works fine, but it can create confusion if you later type your address differently or if you're troubleshooting a login problem.

Browser autofill has the same behavior. If your browser remembers that you logged in as JOHN@EXAMPLE.COM, it will suggest that exact form the next time you visit the login page. Again, this works, but it can make you think there's a problem when there isn't one.

If you're setting up a new device or mail client and you're not sure of the exact capitalization, check your password manager or your email provider's account settings page. Most providers show your address in a consistent form there.

What to do if you're unsure about your email's capitalization

The safest approach is to use lowercase everywhere. If you're setting up a new mail client, entering your address in a form, or configuring Git, type it in all lowercase. This works with every mail provider and every system. You won't run into edge cases or compatibility issues.

If you're already using a different capitalization and everything works, you don't need to change it. But if you're troubleshooting a connection problem or a failed login, try typing the address in lowercase as a first step. It's a quick test that rules out a whole category of issues.

For systems you control — databases, applications, or scripts — always normalize to lowercase on the backend. This is a standard practice in web development and prevents bugs that only show up when users enter data in unexpected ways.

Frequently Asked Questions

Will my email go to the wrong person if I type capitals?

No. Mail servers will deliver it to the correct inbox regardless of capitalization. The only risk is that you might fail to log in to a mail client or service if the system does exact string matching, but the email itself will reach the right place.

Should I always use lowercase in my email address?

Yes, if you're setting up a new account or configuring a system. Lowercase works everywhere and avoids any possibility of mismatch. If you already use capitals and it works, there's no need to change it, but lowercase is the safer default.

Does the domain part of my email address need to be lowercase?

No, but it doesn't matter either way. Domains are always treated as lowercase by DNS and mail servers. You can type example.com or EXAMPLE.COM and reach the same place.

What if my mail provider shows my address with capitals?

That's just how they display it. Internally, the system treats it as lowercase. You can type it in lowercase when logging in, and it will work. If you want to match their display exactly, use their capitalization, but it's not required.

Can I have two accounts with the same address but different capitals?

No. Most mail providers won't let you create a second account if the address already exists, regardless of capitalization. The system sees them as the same address.