What is the maximum line length allowed in an email message per RFC 5322?

The story behind the answer

RFC 5322 allows an email message line to contain at most 998 characters, excluding the terminating carriage return and line feed. This is a hard maximum in the Internet Message Format specification, designed around limitations in systems that send, receive, or store email.

The same RFC gives a much shorter recommendation: lines should normally be no more than 78 characters, again excluding CRLF. That recommendation helps display programs avoid awkward wrapping and truncation, but it is not the protocol’s absolute maximum. The distinction between “MUST” and “SHOULD” is central to this question.

A frequent source of confusion is the number 1,000. SMTP-related transport rules commonly refer to 1,000 octets including the CRLF terminator. Thus, 998 content characters plus two terminator characters reaches 1,000 octets. RFC 5322’s 998-character figure describes the line itself and excludes CRLF. The 80-character option is also misleading: it resembles older display conventions, while the formal recommendation is 78 characters.

Source: Wikipedia · fact-checked Sept. 2026

Add question to a list

Choose a list to keep this question in: