119

RFC 2606 standard reserves the domain names example.org, example.net and example.com for the purpose of being used as examples in documentation.

What is an equivalent for a phone number (including country code) that can be used as an example, e.g. for giving users an example in what format to input phone numbers?

In the best case, it would be a dummy number designated by the relevant standards to be an example phone number, and which would not be attributed to any real subscriber.

  • 8
    An interesting question, considering that software documentation and online help often present exemples, and that nowadays, nobody would like to accidentally provide a real telephone number and get sued because GDPR might consider it as disclosure of personal data ! – Christophe Aug 7 '18 at 17:32
  • 2
    Do you need to have actual numbers or would illustrating the format with placeholders (e.g., +230 5 nnn nnnn) work? – Blrfl Aug 7 '18 at 18:22
  • 5
    This might be better suited for the UX stack – mmathis Aug 7 '18 at 19:34
  • 14
    I'm voting to close this question as off-topic because this has nothing to do with software engineering – esoterik Aug 7 '18 at 20:55
  • 7
    867-5309! Oh, you need an area code, too? – palswim Aug 8 '18 at 5:03
146

The North American Numbering Plan reserves 555-01 numbers for fictitious purposes. If you want an example Seattle number, for example, +1 206 555 0100 - +1 206 555 0199 would do.

In the United Kingdom, Ofcom, the regulator, has set aside numbers for this purpose. For example, if you want a Leeds number, +44 113 496 0000 - +44 113 496 0999 may be used.

I'm sure other countries will have similar things, but I doubt there's one consistent rule across all countries.

  • Australia lists ranges for premium, subscriber, toll free and local rate numbers.

  • Ireland - look for "drama use", which currently lists 020 91X XXXX as the only fictional range.

There's only one real standard for representing telephone numbers - E.164 - so from the perspective of storing a fictitious number, spaces don't matter - +44 113 496 0000 is the same number as +441134960000. But from the perspective of rendering a number to a user, there isn't a global standard, and even within a country there isn't usually a standard. In the US no one would give out their number as +14255550123, they'd use (425) 555-0123, or 425-555-0123, or 425 555 0123. Within the UK, the 3-3-4 (+44 113 496 0000) format is just one of them. Some numbers are 2-4-4 (+44 20 7946 0000), and many numbers are a 4-6 pattern (+44 1632 960999). See this Wikipedia article for more.

| improve this answer | |
  • 7
    Interesting ! Here are some more countries: en.m.wikipedia.org/wiki/Fictitious_telephone_number . In addition, it seems that international prefixes +0 and +999 are reserved, so that numbers starting with these prefixes should in principle be fictitious as well. – Christophe Aug 7 '18 at 18:05
  • 1
    What a pity that the wtng and which gives a lot of useful information per country code doesn't also provide this kind of details ! – Christophe Aug 7 '18 at 18:14
  • 0 is used by the phone company. +0 followed by a number traditionally meant ask the human telephone operator to assist you in calling that number. For example, you could request the long-distance charges be accepted by the call's receiver, and they pay the bill for the call. – Alan Baljeu Aug 16 '18 at 18:49
40

An oft-used example phone number is the numeric progression.

(123) 456-7890

It's widely understood that this doesn't mean you should call that number -- it's an example. Additionally, according to the North American Numbering Plan, it's an invalid number -- area codes can't start with 1.

Alternatively, if you don't need digits, the pound sign, all zeroes, or some other pattern could be used as well.

(###) ###-####

(000) 000-0000

(Note that triple 0 is the Australian emergency number, so use all 0's with caution. Thanks @Gary for the heads up.)


If you actually need something that's designated by regulatory standards: Wikipedia: Fictitious Telephone Number has numbers designated by country. For example, in the US, 555 numbers are almost universally fake, although only the 555-01xx series are officially reserved, according to Wikipedia. The UK's Office of Communications has added many numbers to a list (e.g. 0306 999 0xxx) as well, in addition to many other countries.

| improve this answer | |
  • 12
    Under the current North American Numbering Plan, the example number you give is an invalid number: area codes can't begin with a "1". Unlike the reserved numbers (the 555-01xx series), this is subject to change in the future. – Mark Aug 7 '18 at 20:31
  • 7
    Triple 0 is the emergency phone number for Australia (equivalent to 911 in US or 999 in the UK). It is inadvisable to use that as a default or dummy value here. – Gary Aug 8 '18 at 0:59
  • 10
    I think this answer is bad advise. While the telephone number (123) 456-7890 looks like an invalid number to a human, it only looks so at second glance. Also, any automated system won't recognize it as invalid. It is entirely possible for a telco provider to assign this number to someone. There are actually people who suffer a lot from this. I once watched a report about the poor inhabitants of a house with the address "123 Main Street" in the post area code "12345" and the huge pile of junk mail they receive every day. Not so funny when they come from debt collectors or lawyers. – Philipp Aug 8 '18 at 11:38
  • 3
    @Philipp Apparently the local post office that handles Zip Code 12345 in the US does receive a lot of bogus mail, though apparently nobody lives in the area the Zip Code designates since it belongs to the General Electric corporate headquarters. – nick012000 Aug 9 '18 at 13:56
  • 2
    @Pryftan: 1 is the prefix to dial a non-local number (well, sometimes, it's more complicated than that). Introducing an area code starting with 1 would cause backwards compatibility problems, which the NANP has historically avoided (unlike, say, the British system which breaks back-compat all the time). – Kevin Aug 10 '18 at 1:41
7

There aren't any international standards governing phone numbers, except for the internationally agreed country codes.

Each country has its own conventions regarding leading zeros, parentheses, and spacing.

The closest you'll get to an internationally acceptable number format would be:

+0011122223333

Where + denotes the international dialing prefix for your location, 00 the country code (can be fewer/more digits), 111 the 'area' code (can be fewer/more digits), etc.

If it's client-side phone number validation that you want, then check out this International Telephone Input jQuery plugin. It'll give you an idea of the complexity of the problem, if nothing else.

| improve this answer | |
  • In case it's not obvious, using a nonexistent country code is actually a good idea (but still likely to end up in wrong places when people accidentally drop or misunderstand the meaning of the plus sign). – tripleee Aug 14 '18 at 5:30

Not the answer you're looking for? Browse other questions tagged or ask your own question.