Email Address Validation: How to Check for a Valid Email
Updated: October 13, 2026 · AracMerkezi
Whenever you type an email address into a form or clean up a list, the question "is this address valid?" is bound to come up. The answer is not as simple as it looks: an address can be flawless in format but belong to no one; or it can look unusual and still be completely valid. In this guide we explain how a valid email address is written, the most common mistakes, why regex validation remains limited, and what you should pay attention to when designing a form.
Important note: The Email Address Checker tool checks only the format of the address. It does not verify that the address actually exists, is linked to a mailbox, or can receive messages.
What does a valid email address look like?
An email address consists of three parts: the local part, the @ sign and the domain. For example, in the address ayse.demir@ornek.com, ayse.demir is the local part and ornek.com is the domain. The general rules are as follows:
- The address contains exactly one @ sign (between the local part and the domain).
- The local part consists of letters, digits and common symbols such as
.,_,-,+; its length is at most 64 characters. - The domain consists of labels containing letters, digits and hyphens; labels are separated by dots and there is at least one dot (for example,
ornek.com.tr). - A domain label cannot begin or end with a hyphen; the extension (such as
.com,.org,.tr) consists of at least two letters. - The total length of the address should not exceed about 254 characters.
- Spaces and most special characters cannot be used unless they are enclosed in quotes.
In practice, whether the local part is case-sensitive technically depends on the provider; however, almost all major providers ignore letter case. Even so, converting addresses to lowercase when saving them is a useful habit.
Examples of valid and invalid addresses
The table below summarizes situations encountered in everyday use. The domain names are examples.
| Address | Status | Explanation |
|---|---|---|
| ayse.demir@ornek.com | Valid | Standard format |
| ali_veli-12@ornek.com.tr | Valid | Underscore, hyphen and digits are allowed |
| haber+alisveris@ornek.org | Valid | Plus-tagged address |
| destek@mail.ornek.net | Valid | Subdomain |
| ayse demir@ornek.com | Invalid | Contains a space |
| ayse@@ornek.com | Invalid | Double @ sign |
| ayse@ornek | Usually invalid | No dot or extension in the domain |
| .ayse@ornek.com | Invalid | Local part starts with a dot |
| ayse..demir@ornek.com | Invalid | Two dots in a row |
| ayse.@ornek.com | Invalid | Local part ends with a dot |
| ayse@ornek.con | Valid format | Most likely a typo for .com |
Note the last row: the .con extension does not break the format rules, so a simple check lets it through. Yet the user most likely meant to type .com. Errors like this are caught not by a format check but by a separate typo warning.
The most common mistakes
These are the traps that users and data-entry staff most often fall into:
- Leaving a space: It is very common for a space to slip in at the beginning or end of the address during copy-paste. Trimming leading and trailing spaces before saving mostly fixes the problem.
- A double @ or no @ at all: This shows up especially when trying the AltGr key combination on the keyboard or when typing the address by hand.
- Dot rules: A dot at the beginning or end of the local part, or two dots in a row, is invalid. The domain also cannot have an empty label such as
ornek..com. - Extension typos: Mistakes such as
.con,.cmo,.coomand.commare common. In domain names, swaps such asgmial.comandhotmial.comare also very common. - Using Turkish characters: Letters such as ı, ş, ğ cause problems in classic addresses. Although internationalized domain names and internationalized email standards allow them, not every system supports them; in practice, sticking with ASCII characters is safe.
- Invisible characters: Addresses pasted from another document may contain special spaces that go unnoticed.
Why 100% validation with a simple regex is not possible
The email address format is defined by standards such as RFC 5322, and this definition is surprisingly complex. Local parts containing spaces inside quotes, comments, domains in the form of IP addresses and unusual special characters are technically valid. A regular expression that covers all of them would be very long and hard to read; moreover, it would also accept forms that are never used in practice.
For this reason, most projects deliberately choose a "good enough" approach: a plain pattern that accepts the addresses encountered in real life and rejects obvious errors. Such a pattern might look like this:
^[^\s@]+@[^\s@]+\.[^\s@]{2,}$
This expression says: at least one character that is not a space or @, then @, then again characters that are not a space or @, a dot, and an extension of at least two characters. It is a pattern whose function is clear and which is easy to maintain. Its limits are also clear:
- It accepts addresses with consecutive dots, such as
ayse..demir@ornek.com. - It accepts a local part that starts with a dot, such as
.ayse@ornek.com. - It cannot catch typos such as
ayse@ornek.con. - It rejects rare but valid forms such as quoted local parts or domains with IP addresses.
It is possible to write a stricter pattern, but every tightening increases the risk of wrongly rejecting a real address. To try out regular expressions, the Regex Tester will come in handy; to learn the basic logic, you can look at the article Regex and Regular Expressions Guide.
The difference between a format check and an address actually existing
This distinction is the most commonly confused point. A format check looks at whether the text conforms to the address rules. kimse.yok@ornek.com is flawless in format, but such a mailbox may not exist. Whether an address really exists can be learned only by sending a message to it. There are also server-side checks that look at whether the domain accepts mail; however, many providers, for spam and privacy reasons, do not openly reveal whether a mailbox exists. For this reason, the definitive answer to the question "does it exist?" is often only a confirmation message.
In short: a format check performs a quick preliminary screening, while a confirmation email proves ownership. Neither replaces the other.
Validation tips for form design
If you collect email addresses on your own site, this approach works well:
- Do a lightweight format check. A plain pattern like the one above is enough; overly strict rules lock out real users.
- Show a typo warning. For common mistakes such as
gmial.comor.con, offer a suggestion like "Did you mean gmail.com?", but leave the decision to the user. - Send a confirmation email. Sending a message containing a link before registration is completed shows that the address both exists and belongs to the user.
- Trim spaces. Automatically remove leading and trailing spaces.
- Give a clear error message. Instead of "Invalid input," use an explanatory phrase such as "The domain after the @ sign seems to be missing."
- Check on the server side as well. Validation in the browser can be bypassed; the real check must be done on the server.
Gmail and other provider differences
Providers may interpret addresses differently. In Gmail, dots in the local part do not matter: ayse.demir@gmail.com and aysedemir@gmail.com reach the same mailbox. Also, plus-tagged addresses such as ayse+alisveris@gmail.com land in the main mailbox; this feature is useful for tracking which address you gave to which site. Not all providers behave this way; with some, addresses with and without dots are separate mailboxes. So be careful before merging addresses on the assumption that they are "the same person," and store the address the user typed as it is.
Spam, privacy and KVKK
Writing an email address as plain text on a web page makes it easier to become a target of automatic harvesting bots and can lead to a flood of spam. Using a contact form instead, or presenting the address as an image, is safer. Take care not to share your address everywhere and to use separate addresses for different purposes; also set strong passwords for account security, and the article How to Create a Secure Password? will guide you.
If you collect other people's email addresses, the address counts as personal data. Under KVKK (Turkey's Personal Data Protection Law), you must provide a privacy notice explaining why the data is collected, how it will be used and the user's rights. Obtaining commercial electronic message consent is also required to send marketing messages. This article is not legal advice; check the legislation from official sources for your own situation or consult a specialist.
Related tools
To quickly check the format of an address, you can use the Email Address Checker tool. To see the format of your links, take a look at the URL Checker; to try your own patterns, the Regex Tester; and to evaluate your account's password, the Password Strength Checker. These tools perform format checks only; they do not verify that an address exists.
Frequently asked questions
Does the email checker tool verify that the address actually exists?
No. The tool looks only at the format of the address: it checks rules such as a single @ sign, the domain and the extension. You can find out whether an address is linked to a mailbox only by sending a confirmation email to it.
What are the rules for using dots in an email address?
The local part cannot start or end with a dot and cannot contain two dots in a row. For example, ayse.demir@ornek.com is valid; .ayse@ornek.com and ayse..demir@ornek.com are invalid.
Is a single regex enough to validate an email?
No. Because RFC 5322 is very complex, a simple pattern can both let wrong addresses through and reject rare valid ones. The most robust approach is to use a lightweight format check together with a confirmation email.
Tools mentioned in this guide
More guides
- How to Spot a Phishing Email: Protection Guide – How to spot a phishing email? 10 signs of fake messages, how to check a link, first steps if you clicked, and how to report to USOM, Turkey's cyber response center.
- How to Create a Secure Password: Length, Entropy and 8 Rules – How to create a secure password: password strength in bits, random-word passphrases, command-line generation and eight practical rules.
- What Are JSON, Base64 and URL Encoding? Encoding vs Encryption vs Hashing – What do JSON, Base64, URL encoding, HTML entities, SHA and JWT do? Encoding vs encryption vs hashing, with examples that were run and verified.
- What Is Regex (a Regular Expression)? A Beginner's Guide with Tested Examples and Common Mistakes – What is regex, and what do \d \w + * [] () mean? Date, phone and email examples, greedy matching, the Turkish letter issue and a ReDoS warning.
- How to Create a WhatsApp and Wi-Fi QR Code: Step-by-Step Guide – Turn a Wi-Fi password and a WhatsApp chat link into a QR code: wa.me format, country code, preset message, print size, security and testing tips.
This article is for general information only and is not legal, financial or medical advice. We are not an official institution.