Skip to content

What can you put in your email address?

A simple question – what characters can you put in an email address? Like many things to do with the Internet the answer isn’t as simple or direct as you might think. We’ll look at what makes a valid email address, both in theory and in practice.

A simple question – what characters can you put in an email address? Like many things to do with the Internet the answer isn’t as simple or direct as you might think.

We’ll look at what makes a valid email address, both in theory and in practice.

For daily use you don’t need to know. If you simply copy the email address as you’re given it, you should be OK.

But knowing a bit more about email addressing can help you work out if an email address is incorrect or identify why it doesn’t work. Developers and programmers might be surprised to discover that their carefully written web pages or code aren’t entirely correct.

Which ones are correct?

Which of these email address (all fake) is formatted correctly?

The answer is that they are all strictly valid though they might not be useable in practice.

Knowing a bit more about email addresses may well interested some who, like us, get intrigued by these details.  This is by no means a comprehensive look at email address formatting.  We’ve provided links to the various RFC specification documents if you’re interested in the minutiae.

Local Address @ Domain

There are two parts to an email address – the ‘Local Part’ and the Domain – which are separated by the famous @ symbol.

For example [email protected] has ‘fred’ as the local part and ‘freddagg.com’ as the domain.

Historical note: back at the start of the internet, Ray Tomlinson developed the first simple email system to work between computers. He’s the guy who chose the @ symbol to separate the name and domain name.

The two parts of an email address have different rules about what is permitted. Domains are much more limited than local parts.

Domain rules

A domain name can contain letters, digits and hyphens only, up to a maximum of 255 characters.

Each part of a domain name is separated by the .(aka dot, fullstop or period).

Domain naming is a whole article on its own – suffice it to say what we’re used to domains like .com .edu etc but there are also country domain suffixes (Top Level Domains TLD’s) like .au .uk and .us right down to obscure ones like.hm (for the usually uninhabited Heard and McDonald Islands). See here for a full list.

There’s no consistency about domain suffixes. The commercial domain name is a good example. In the US it’s .com as we all know. Australia clones that for .com.au but the UK uses .co.uk and New Zealand follows suit with .co.nz .

That’s pretty straight-forward, the surprises come when you look at the part before the @ symbol …

Local Part rules

Back in 1982 an Internet standard for email addresses was formalized called “Standard for the format of ARPA Internet text messages” which goes under the catchy name of RFC 822 and it’s this standard that most email systems obey.

There was an update to that in April 2001 called ‘Internet Message Format’ known as RFC 2822 .

According to RFC 2822 the local part of an email address can contain any of the following characters.

  • A to Z letters, upper and lower case.
  • 0 through 9 digits
  • . (fullstop, period) but not as the first or last character
  • ! # $ % & ' * + - / = ? ^ _ ` { | } ~ - all are permitted.

It’s this last point which might surprise some people – most might think that an email address using one of these non-alphanumeric characters is ‘illegal’ but it’s not. That said, it’s quite possible that one of these ‘extra’ characters will not be accepted by a mail system.

The + plus symbol can have special meaning in some mail systems including Exchange Server.
See How to get ‘Plus’ email addresses, the new feature in Microsoft 365 and Outlook.com
A simple check for Plus addressing with your email address

Other characters (including spaces) are also permitted if included within double quote marks. For example ” Bruce [email protected] ” is not permitted but mailto:”Bruce%20Bayliss”@freddagg.com  is permitted (though it might not be accepted by a lot of software and is definitely NOT recommended).

An email address might be ‘legal’ (according to the RFC) but that doesn’t necessarily mean that software will accept it. We’re not just talking about email software – email addresses are often used as identification or login so those systems should check and accept the full range of valid characters. As we were preparing this article we noticed that Microsoft Word did not recognize all the sample email addresses as such.

Shame file:the original 2006 article was prompted, in part, when we discovered our own online store wasn’t properly configured.It turns out that the store code we purchased didn’t comply with RFC 2822, though it’s taken 18 months or more to strike an email address which broke the system. And yes, our programmers fixed the problem quickly.

Even Google’s Gmail doesn’t fully obey the email specification in one important way. A period ‘.’ can be used within a local part and it won’t change the mailbox destination.For example [email protected]  [email protected] and even [email protected] will all arrive at the mailbox of [email protected] .This is unlike almost any other mail system which would consider each of those addresses to be quite different mailboxes.

Maximum length of an email address

The local part can be up to 64 characters, much less than the domain part at 255 characters

That means the maximum email address length is Local Part plus @ plus domain or 64 + 1 + 255 = 320 characters.

An email address of anything approaching 320 characters is rare, but it probably will come as an unwelcome surprise to programmers who have assumed a much shorter length in their databases.

Even the standard maximum 255 character text field isn’t sufficient, in theory. We looked at an Access sample database from Microsoft which only allows 50 characters in total for an email field.

As with many things about Internet specifications, there’s a gap between what is permitted and what is supported. Shorter email addresses are better for various reasons but developers might want to consider accommodating longer strings (for structural convenience probably 255 characters).

UPPER or lower case

According to RFC 2821 (the related SMTP specification), email addresses should be case-sensitive (ie FRED@ ,Fred@ and fred@ are three different email prefixes).

However, even the specification notes that this is to be discouraged.

In practice email addresses should be case INsensitive – thought there are rare cases when some receiving systems make the case distinction (usually this is a programming oversight).

Use what works

All these suggestions, rules and RFC’s are all well and good but as we’ve seen there is no firm laws that everyone has to obey. There’s no point setting up an email address which some people won’t be able to use.

About this author

Office-Watch.com

Office Watch is the independent source of Microsoft Office news, tips and help since 1996. Don't miss our famous free newsletter.