429

If I use tel: I should write the international phone code, like that.

<a href="tel:+6494461709">61709</a>

So far, so good, but I can't find information on how to write a cell phone number in an "international" way, if there is one.

Hakan Fıstık
  • 16,800
  • 14
  • 110
  • 131
Sebastian Starke
  • 5,198
  • 3
  • 24
  • 35
  • 25
    Is there a difference? – George Cummins Jun 20 '13 at 17:11
  • I dont know, if theres an "international" way to write down a cell phone number. – Sebastian Starke Jun 20 '13 at 17:12
  • 1
    celphone and landline numbers should work the same – Dominic Green Jun 20 '13 at 17:13
  • 5
    That means 0171 would be +49171 (for Germany)? – Sebastian Starke Jun 20 '13 at 17:14
  • 7
    According to [this document](http://www.uniontelecard.com/calling-guides/germany/), you are right. Drop the '0' (which is needed only when dialing from within Germany), add the '+' prefix and country code. – George Cummins Jun 20 '13 at 17:17
  • Am I the only one who gets the message: "Webpage not available. The webpage at tel:0012345 might be temporarily down or ..." when clicking the `tel:` link? Android 5 default's browser. Update: http://stackoverflow.com/a/11042632/1066234 – Avatar Jul 28 '16 at 06:40
  • You can sometimes replace the `+` by `00`, it's part of the standard but most systems will recognize only the `+` sign. Also note that this depends on your mobile or landline carrier to recognize the format as well ie. I have all my contacts stored in international format because it just makes things simplier but I found out that one particular carrier in my country would always say the number is invalid when trying to dial. I simply changed carrier and problem solved. – Bruno Finger Jan 14 '19 at 10:13

5 Answers5

439

When dialing a number within the country you are in, you still need to dial the national trunk number before the rest of the number. For example, in Australia one would dial:

   0 - trunk prefix
   2 - Area code for New South Wales
6555 - STD code for a specific telephone exchange
1234 - Telephone Exchange specific extension.

For a mobile phone this becomes

   0 -      trunk prefix
   4 -      Area code for a mobile telephone
1234 5678 - Mobile telephone number

Now, when I want to dial via the international trunk, you need to drop the trunk prefix and replace it with the international dialing prefix

   + -      Short hand for the country trunk number
  61 -      Country code for Australia
   4 -      Area code for a mobile telephone
1234 5678 - Mobile telephone number

This is why you often find that the first digit of a telephone number is dropped when dialling internationally, even when using international prefixing to dial within the same country.

So as per the trunk prefix for Germany drop the 0 and add the +49 for Germany's international calling code (for example) giving:

<a href="tel:+496170961709" class="Blondie">
    Call me, call me any, anytime
      <b>Call me (call me) I'll arrive</b>
        When you're ready we can share the wine!
</a>
Abrar Jahin
  • 13,970
  • 24
  • 112
  • 161
  • 7
    Alternative: – optimiertes Mar 14 '16 at 03:21
  • 36
    @optimiertes, actually no. The trunk prefix is different for different countries, so `0` works in most, but not all. –  Mar 14 '16 at 03:29
  • This answer is a reonable match for the ITU-T's E.123 format suggestion https://en.wikipedia.org/wiki/E.123 Which is also similar to the later E.164 format but I think that recomends using 00 instead of +. – TafT Oct 18 '16 at 09:07
  • Brilliant answer, really love that your explaination goes into detail about every aspect of building a tel link – Cacoon May 04 '18 at 03:56
  • To dial internationally you need to dial the international calling prefix (0011 in Australia), in a lot of other countries you just dial 0, or call the local operator. – iceburg Aug 21 '18 at 05:24
  • 1
    It's also good to note some important info @Tropicalrambler shared on his answer as well. – Bruno Finger Jan 14 '19 at 10:09
  • 1
    > "when dialing a number within the country you are in, you still need to dial the national trunk number before the rest of the number." **That is not true universally** i.e.: in USA - you can just dial area code + exchange + number - (777) 555 - 3333, in some older area codes you can just dial exchange + number . In Russia, for landlines it's much the same. Within the same city, you often can get away with dialing just 5-6 last numbers ( depending on how old the infrastructure is) on landlines. ( Mobile phones are a different story) – konung Mar 06 '19 at 20:43
  • 1
    I came here looking for a way to do 1300, 13, and 1800 numbers. Apparently the [only](http://www.netmagellan.com/coding-australian-13-and-1300-tel-numbers-404-errors-1916.html) [way](https://forums.whirlpool.net.au/archive/2481403) to do it (that works locally and internationally) is to [suffix](https://tools.ietf.org/html/rfc3966#section-6) the `href` with `;phone-context=+61` – Hashbrown Apr 01 '20 at 07:01
74

I know the OP is asking about international country codes but for North America, you could use the following:

<a href="tel:+1-847-555-5555">1-847-555-5555</a>

<a href="tel:+18475555555">Click Here To Call Support 1-847-555-5555</a>

This might help you.

Nora
  • 3,093
  • 2
  • 20
  • 22
vineet
  • 917
  • 6
  • 3
  • 34
    Only if your customers are only in North America. – BJury Nov 24 '14 at 10:56
  • 7
    and not using international cell phones (I had a Japanese girl that had to dial the USA international code even when she was here) – BillyNair Jul 28 '15 at 22:20
  • 12
    Canada and the US are +1 but Mexico is +52 (if you are planning as they are saying for North America (last time I looked at a map, Mexico was as well part of it) you will need also +52 – Nelson Apr 06 '16 at 23:07
  • 8
    I wonder why this answer got upvoted. It would be perfectly fine to have an answer that covers only US numbers, but there is no reason you would not add the simple "+" to make them work from everywhere! (tel:+1847... would work for calling a US number from anywhere in the world). – Ecuador May 04 '17 at 13:42
  • 14
    Downvote, because the OP was explicitly asking about international links (which should be all links on the web anyways) and you're still posting an US-only solution. You know that there is way more then just the US on our planet? And as you could have seen from his profile OP isn't from US himself (but from Germany). – miho Jul 03 '17 at 07:49
24

The BlackBerry browser and Safari for iOS (iPhone/iPod/iPad) automatically detect phone numbers and email addresses and convert them to links. If you don’t want this feature, you should use the following meta tags.

For Safari:

<meta name="format-detection" content="telephone=no">

For BlackBerry:

<meta http-equiv="x-rim-auto-match" content="none">

Source: mobilexweb.com

Rafff
  • 1,510
  • 3
  • 19
  • 38
22

As an additional note, you may also add markup language for pausing or waiting, I learned this from the iPhone iOS which allows numbers to be stored with extension numbers in the same line. A semi-colon establishes a wait, which will show as a next step upon calling the number. This helps to simplify the workflow of calling numbers with extensions in their board. You press the button shown on the bottom left of the iPhone screen when prompted, and the iPhone will dial it automatically.

<a href="tel:+50225079227;1">Call Now</a>

The pause is entered with a comma ",", allowing a short pause of time for each comma. Once the time has passed, the number after the comma will be dialed automatically

<a href="tel:+50225079227,1">Call Now, you will be automaticlaly transferred</a>
Tropicalrambler
  • 619
  • 1
  • 9
  • 15
5

It's the same. Your international format is already correct, and is recommended for use in all cases, where possible.

Chalky
  • 1,624
  • 18
  • 20