How do I hyperlink a phone number?
Categories:
Hyperlinking Phone Numbers: The 'tel:' Protocol Explained

Learn how to create clickable phone numbers on your website using the 'tel:' URI scheme, enhancing user experience on mobile devices.
In today's mobile-first world, making it easy for users to contact you is paramount. One common requirement is to allow users to directly call a phone number by tapping or clicking on it. This article will guide you through the process of hyperlinking phone numbers using the tel:
URI scheme, ensuring your website is user-friendly across all devices.
The Basics of 'tel:' Hyperlinks
The tel:
URI scheme is a standard way to create hyperlinks that, when activated, initiate a phone call to the specified number. This is incredibly useful for mobile users, as it eliminates the need to manually dial a number. On desktop computers, clicking a tel:
link might open a softphone application (like Skype or Microsoft Teams) or prompt the user to choose an application.
<a href="tel:+1-555-123-4567">Call Us</a>
<a href="tel:555-123-4567">555-123-4567</a>
Basic tel:
hyperlink examples
+1
for the USA) in your tel:
links, even if you expect most users to be local. This ensures international users can call correctly and helps with proper routing in some VoIP systems.Formatting Phone Numbers for 'tel:' Links
While browsers are generally forgiving, it's best practice to format phone numbers within tel:
links using a standardized approach. The E.164 format is recommended, which includes a +
sign followed by the country code, then the full number without spaces or hyphens. However, for display purposes, you can format the visible text of the link in a more user-friendly way.
<!-- Recommended for maximum compatibility -->
<a href="tel:+18005550123">Call 1-800-555-0123</a>
<!-- Acceptable, but E.164 is preferred for href -->
<a href="tel:800-555-0123">800-555-0123</a>
Phone number formatting in tel:
links
flowchart TD A[User Clicks Link] --> B{Device Type?} B -->|Mobile| C[Initiate Phone Call] B -->|Desktop| D[Open Softphone App / Prompt User] C --> E[Call Connected] D --> E[Call Connected]
Flow of a tel:
hyperlink activation
Adding Extensions and Pauses
You might need to include an extension number or a pause in the dialing sequence. The tel:
URI scheme supports this using p
for pause and w
for wait. A p
typically represents a short pause (around 0.5 to 1 second), while w
waits for a dial tone. Multiple p
characters can be used for longer pauses.
<!-- Dial 555-123-4567, then pause, then dial extension 123 -->
<a href="tel:+1-555-123-4567p123">Call Sales (Ext. 123)</a>
<!-- Dial 555-123-4567, wait for dial tone, then dial extension 456 -->
<a href="tel:+1-555-123-4567w456">Call Support (Ext. 456)</a>
Using pauses and waits for extensions
p
and w
can vary slightly between devices and applications. Test these links thoroughly on different platforms to ensure they function as expected.Best Practices for Accessibility and User Experience
Beyond just making the link work, consider the overall user experience. Clearly label your phone numbers, use appropriate styling, and ensure they are accessible to all users.
1. Use Descriptive Link Text
Instead of just Click here
, use text like Call Us Now
, Contact Support
, or display the full phone number.
2. Ensure Visibility
Make sure the link is clearly visible and distinguishable from regular text. Use appropriate CSS for styling.
3. Provide Alternatives
For users who might not want to make a call, always offer alternative contact methods like email forms or live chat.
4. Test on Multiple Devices
Verify that your tel:
links work correctly on various mobile phones (iOS, Android) and desktop browsers with different softphone configurations.