An article on reddit brought on the inspiration for this, an actual answer to how long an email input field should be. Many developers say or use 255 characters; for example; <input type=”text” name=”email” maxlength=”255″ /> – this is incorrect!
The maximum length of an email address is made up of three parts, firstly the “local” part with a max of 64 characters, usually a users name or nickname which is infront of the @ sign. Secondly, a 1 character @ sign in the middle, and lastly a domain which can be a maximum of 255 characters.
So to sum it up, bill@microsoft.com would be:
This means the maximum length an email address can be is 64+1+255 or 320 characters. For database designers this has also often been an issue as MySQL limits VARCHAR’s to 255 characters and you don’t want to use a blob/text field – but this is also incorrect! Since MySQL 5.0.3 you can have up to 65,535 characters in a VARCHAR!
Popularity: 12% [?]