136

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.

Florian
  • 1,089
  • 2
  • 8
  • 7
  • 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 07 '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 07 '18 at 18:22
  • 5
    This might be better suited for the UX stack – mmathis Aug 07 '18 at 19:34
  • 15
    I'm voting to close this question as off-topic because this has nothing to do with software engineering – esoterik Aug 07 '18 at 20:55
  • 7
    [867-5309](https://en.wikipedia.org/wiki/867-5309/Jenny)! Oh, you need an area code, too? – palswim Aug 08 '18 at 05:03
  • 1
    FWIW, International Telecommunications Union (ITU, formerly called CCITT) Rec. E.164 lays out the numbering plan used for international calling. https://www.itu.int/rec/T-REC-E.164-201011-I/en Numbering plans within countries devolve to those countries to set up. – O. Jones Aug 08 '18 at 13:13
  • 2
    @esoterik there are [libraries](https://pypi.org/project/phonenumbers/) and [regexps](http://www.regexlib.com/Search.aspx?k=phone) for local and international phone number validation so I reckon it's at least somehow related to software engineering or user experience. – jjmontes Aug 08 '18 at 15:06
  • What country are you talking about? Number formats vary greatly. – Andy Aug 09 '18 at 01:39
  • 2
    You use the same numbers that TV series use. – Bakuriu Aug 09 '18 at 21:28
  • @esoterik by that token neither do questions on RFCs... that doesn't seem particularly useful. (I answered because this stuff is what I engineer with my software.) – Frank Shearar Aug 10 '18 at 03:55
  • 2
    When I was working at a telecom provider, we used to use 06-11111111 as example phone number. The owner of that number had a full time job asking IT organizations to please stop using his phone number for testing purposes :D And he even paid a lot of money for that number. – winkbrace Aug 10 '18 at 09:22
  • 2
    @palswim: 867-5309 is a perfect example of how **not** to pick a fictitious phone number. https://en.wikipedia.org/wiki/867-5309/Jenny#Popularity_and_litigation (You probably know that, but someone might decide to use it without following the link.) – Keith Thompson Aug 10 '18 at 20:49

3 Answers3

157

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.

Frank Shearar
  • 16,643
  • 7
  • 48
  • 84
  • 9
    Interesting ! Here are some more countries: https://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 07 '18 at 18:05
  • 1
    What a pity that the [wtng](http://www.wtng.info/wtng-hlp.html#HowTo) and which gives a lot of useful information per country code doesn't also provide this kind of details ! – Christophe Aug 07 '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.

Cullub
  • 525
  • 3
  • 8
  • 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 07 '18 at 20:31
  • Ah, that makes sense. I'll add that to my answer. – Cullub Aug 07 '18 at 20:47
  • 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 08 '18 at 00: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 08 '18 at 11:38
  • @Philipp the area code *123* is an invalid area code as it starts with the number 1. I edited my question to make that more clear. According to the current [North American Numbering Plan](https://en.wikipedia.org/wiki/North_American_Numbering_Plan#Modern_plan), the area code can't start with the number 1. It would be fairly easy to recognize therefore by automated systems, and easier than designated 555 numbers by humans, as the pattern in those is less obvious to the untrained eye. – Cullub Aug 08 '18 at 14:00
  • @Cullub The story was from the Netherlands, as far as I remember. – Philipp Aug 08 '18 at 14:17
  • @Philipp [867-5309](https://en.wikipedia.org/wiki/867-5309/Jenny#Popularity_and_litigation) is another one of those real life numbers that caused a great deal of trouble. – Cort Ammon Aug 08 '18 at 22:12
  • 3
    @Philipp Apparently the local post office that handles Zip Code 12345 in the US does receive [a lot of bogus mail](http://spectrumlocalnews.com/nys/capital-region/news/2015/09/18/sorting-fact-from-fiction-in-schenectady), though apparently nobody lives in the area the Zip Code designates since it belongs to the [General Electric corporate headquarters](http://articles.baltimoresun.com/1998-12-15/news/1998349006_1_love-letters-north-pole-letters-to-santa). – nick012000 Aug 09 '18 at 13:56
  • **Additionally, according to the North American Numbering Plan, it's an invalid number -- area codes can't start with 1.** At least for now? – Pryftan Aug 09 '18 at 22:17
  • 2
    @Pryftan: 1 is the prefix to dial a non-local number (well, sometimes, [it's more complicated than that](https://blogs.msdn.microsoft.com/oldnewthing/20061127-14/?p=28903/)). Introducing an area code starting with 1 would cause backwards compatibility problems, which the NANP has historically avoided (unlike, say, the [British system](https://www.youtube.com/watch?v=LsxRaFNropw) which breaks back-compat all the time). – Kevin Aug 10 '18 at 01:41
  • @Kevin What are you on about ? Ah right... well I have been very tired. Good point. You're absolutely right. I was at the time just thinking of how some things have had to change in telephony. And thank you for your comment too. I'm unsure if I should be embarrassed but probably I shouldn't be because I wasn't even thinking of the number itself so much as area codes more generally. – Pryftan Aug 10 '18 at 20:00
  • The US did have area code splits where a whole bunch of subscribers got new numbers, though it was much less intense than the barrage of phone number changes the UK got in the 1990-2000 timeframe. Afaict since the chances in 2000 though UK numbers have been pretty stable. – Peter Green May 17 '19 at 20:30
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.

Aaron F
  • 179
  • 1
  • 3
  • 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 05:30