Maximum character limit of an e-mail address

Asked

Viewed 4,020 times

2

I want to validate an email field both on the page and in the database, but I don’t know what the character limit is that an email can have. Hug!

  • 1

    {64}@{255} i.e., 64 + 1 + 255 = 320

1 answer

6

RFC 5321 specifies (section 4.5.3): maximum 256 characters for a complete email.

Other limits: 255 for the domain, 64 for the username (part that comes before the @).

However, the recommendation is that the servers accept addresses outside these limits (4.5.3.1). These are minimum limits that the server should implement, not maximum limits to filter out. (But actually an email longer than 256 characters should be anomalous even.)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.