What is the maximum length of a valid email address? Is it defined by any standard?
👉 An email address must not exceed 254 characters.
This was accepted by the IETF following the submitted erratum for RFC 3696.
The question of the maximum allowed email address length was supposed to be addressed in RFC 3696 "Application Techniques for Checking and Transformation of Names", specifically in the Section 3 "Restrictions on email addresses".
The original version of RFC 3696 described 320 characters as the maximum length (see Section 3), but John Klensin subsequently submitted the erratum 1003 to change this value to 256 characters.
But this also was not precisely correct. And this situation was finally fixed after Dominic Sayers submitted the erratum 1690. In this erratum it was noted that the Mailbox
element, i.e. the email address, has the maximum length of 👉 254 characters. Here is the quote of the "Note" left in this erratum:
I believe erratum ID 1003 is slightly wrong. RFC 2821 places a 256 character limit on the forward-path. But a path is defined as
Path = "<" [ A-d-l ":" ] Mailbox ">"
So the forward-path will contain at least a pair of angle brackets in addition to the Mailbox. This limits the Mailbox (i.e. the email address) to 254 characters.
Aside from RFC 3696, the maximum length of the Path
element is also specified in RFC 5321, specifically in the Section 4.5.3.1.3:
The maximum total length of a reverse-path or forward-path is 256 characters.
People should be aware of the errata against RFC 3696 in particular. Three of the canonical examples are in fact invalid addresses.
I've collated a couple hundred test addresses, which you can find at http://www.dominicsayers.com/isemail