Standard: Email Address Character Limit Based on RFC 3696

When implementing email validation, many of us focus solely on the structure of the email (Regex, anyone?). However, understanding the character limit specifications is equally important and often overlooked.

RFC 3696 states "That limit is a maximum of 64 characters (octets) in the "local part" (before the "@") and a maximum of 255 characters (octets) in the domain part (after the "@") for a total length of 320 characters."

Source: RFC 3696

In simpler terms:

[local portion]@[domain portion] (i.e. john@website.com)  

  • The local portion before "@": 64 characters
  • "@" itself: 1 character
  • The domain portion after "@": 255 characters 
  • The total length cannot exceed 320 characters (64 + 1 + 255)

Understanding these character limits is crucial when validating email addresses, as exceeding them can cause issues with email delivery and may compromise the security of your application.

Disclosure: This entry is based on a collection of my personal notes, and some of the information may be outdated or no longer relevant. If you notice any inaccuracies, please let me know in the comments. I appreciate your feedback and will correct the entry as needed. :)

Comments

Popular posts from this blog

Words: You Aren't Gonna Need It (YAGNI)

Words: Domain-Driven Development

Words: Chaos Engineering