Email Validation Done Right
Search:

Here is a bunch of email addresses. You can also try your own on the main page.

Email AddressGood?PHPPHP RegexJavascriptNotes
YYY? Plain address
YYY?  
YYY?  
YYY?  
YYY? RFC 1123 superceded RFC RFC 1035, which would have forbade this domain
YYY? While "somewhere" is not a valid TLD yet, the email address violates no rules
YYY?  
YYY? Uncommon characters
YYY? Uncommon characters
YYY? Hosts can have hyphens
YYY? Some check for letters in the local part
YYY? Old-school relays
YYY?  
YYY? IPv4 addresses are valid
YYY? IPv6 addresses are valid
nnn? Spaces are not allowed without quoting
nnn? Domains with spaces must have brackets
nnn?  
nnn? Escaping not allowed without quoting
nnn?  
nnn?  
nnn?  
nnn?  
nnn? Two @ symbols not allowed without brackets or quoting
nnn? Escaping doesn't make it valid either
nnn?  
nnn?  
nnn? This is not a valid IP address
nnn? Invalid IPv6 address
nnn? Invalid IPv6 address
YYY? No need to quote this one, but no reason to not quote either
YYY? Properly quoted
YYY? Properly quoted, optionally escaped
YYY? Spaces are allowed when quoted
YYY? Leading spaces may be evil but allowed
YYY? Spaces are allowed and can be escaped
YYY? An escaped backslash
YYY? Escaped backslash at the end confuses some parsers
YYY?  
YYY? Uses the obsolete, yet valid form
YYY? Quoted localparts can have escaped quotes
YYY? Escaping a lot more
YYY? Some parsers have issues with the singleton quote
YYY? An empty quoted localpart is valid... somehow
YYY? Double periods are allowed in a quoted localpart
nnn? Unbalanced quotes
nnn?  
nnn? Escaping doesn't make it valid either
nnn? Quotes in the middle must be escaped
nnn? Escaping characters requires the localpart to be quoted
nnn?  
nnn? If the quote and the period were swapped, this would be valid.
YYY? 64 characters in the localpart
nnn? The localpart is one character too long
YYY? 63 letters is the maximum length of a label in the domain
nnn? Domain label is one character too long
nnn? No localpart
nnn? No domain
nnn? Localpart can not start with a period
nnn? Localpart can not end with a period
nnn? Localpart can not have two successive periods
nnn? Domain starts with a period
nnn? Domain ends with a period
nnn? Domain contains double period
nnn? Top level domain must be all alphabetic
nnn?  
nnn? Domain has leading hyphen on a label
nnn? Domain has trailing hyphen on a label
nnn? Domain has a leading hyphen on a label
nnn? Domain has two successive hyphens
YYY? Bracketed domain
YYY? Bracketed domains can contain spaces
YYY? Bracketed domains can have escaped characters
nnn? Bracketed domains still can't violate the period nor hyphen rules.
nnn?  
nnn?  
nnn?  
nnn?  
nnn?  
nnn?  
YYY? Yes, domains can have an @ symbol
nnn? Invalid bracketing
nnn?  
nnn?  
nnn?  

Do you have any you would like to add?

There are 250,000 species of flowering plants on Earth today. Tyler Akins <>
Contact Me - Legal Info