Android – How to create hyperlink to call phone number on mobile devices

androidhtmlhyperlinkmobile

What is the proper, universal format for creating a clickable hyperlink for users on mobile devices to call a phone number?

Area code with dashes

<a href="tel:555-555-1212">555-555-1212</a>

Area code with no dashes

<a href="tel:5555551212">555-555-1212</a>

Area code with dashes and 1

<a href="tel:1-555-555-1212">555-555-1212</a>

Area code with no dashes and 1

<a href="tel:15555551212">555-555-1212</a>

Area code with dashes, 1 and + sign

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

Area code with no dashes, 1 and + sign

<a href="tel:+15555551212">555-555-1212</a>

Best Answer

Dashes (-) have no significance other than making the number more readable, so you might as well include them.

Since we never know where our website visitors are coming from, we need to make phone numbers callable from anywhere in the world. For this reason the + sign is always necessary. The + sign is automatically converted by your mobile carrier to your international dialing prefix, also known as "exit code". This code varies by region, country, and sometimes a single country can use multiple codes, depending on the carrier. Fortunately, when it is a local call, dialing it with the international format will still work.

Using your example number, when calling from China, people would need to dial:

00-1-555-555-1212

And from Russia, they would dial

810-1-555-555-1212

The + sign solves this issue by allowing you to omit the international dialing prefix.

After the international dialing prefix comes the country code(pdf), followed by the geographic code (area code), finally the local phone number.

Therefore either of the last two of your examples would work, but my recommendation is to use this format for readability:

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

Note: For numbers that contain a trunk prefix different from the country code (e.g. if you write it locally with brackets around a 0), you need to omit it because the number must be in international format.