How to Format SharePoint JSON for Email and Telephone Links
Question details
The user needs to implement conditional JSON formatting in a SharePoint list to dynamically generate 'mailto:' links for email addresses and 'tel:' links for telephone numbers within the same communication field.

- Product
- Microsoft SharePoint
- Device & OS
- not provided
- Scenario
- Customizing a SharePoint list that uses a single column for multiple types of contact information, requiring dynamic link protocols based on the content.
- Observed behavior
- The specific field values need to automatically render as the correct hyperlink protocol (email vs. phone) based on a conditional evaluation of the text.
Ensure you have Edit or Design permissions for your SharePoint list and note the exact internal names of the columns you plan to format.
Apply Conditional JSON Column Formatting
Use custom JSON code in the column settings to evaluate the cell content and dynamically apply the appropriate 'mailto:' or 'tel:' protocol.
SharePoint allows you to customize the display of list columns using JSON. By using an expression (such as checking if a string contains an '@' symbol), you can determine whether a field contains an email address or a phone number and adjust the hyperlink accordingly.
Navigate to your SharePoint list, click the header of your communication column, select 'Column settings', and then choose 'Format this column'.
At the bottom of the formatting pane on the right side of the screen, click 'Advanced mode' to enable custom JSON input.
Write your JSON object using the `=if()` operator to check if the field value contains an '@' symbol. If true, format the `href` attribute to prepend 'mailto:'; otherwise, format it to prepend 'tel:'.
Click 'Save' to apply the formatting. Test the links in your list to ensure emails open your default mail client and phone numbers prompt a compatible calling application.

Consult the Microsoft Q&A Community
If your list requires highly complex validation or custom development beyond basic JSON, seek expert advice from dedicated SharePoint developers.
Manage Your Office Documents Seamlessly with WPS Office
While SharePoint is excellent for web-based lists and complex JSON formatting, you still need a reliable suite for your everyday documents. WPS Office is a free, lightweight, and powerful alternative to Microsoft Office, offering full compatibility with Word, Excel, and PowerPoint formats without the high subscription costs.
- 1. Download the installer: Visit the official WPS website and download the free installation package for your operating system.
- 2. Install WPS Office: Run the downloaded file and follow the quick on-screen instructions to set up the software.
- 3. Open and edit files: Launch WPS Office and immediately start opening, editing, and saving your Microsoft Office documents.

Frequently Asked Questions
Can I display different icons for emails and phone numbers using SharePoint JSON?
Yes, you can use conditional statements within the 'iconName' property of your JSON code to automatically display a 'Mail' icon for emails and a 'Phone' icon for telephone numbers based on the evaluated text value.
Why isn't my 'tel:' link working when I click it in the SharePoint list?
Telephone links require a compatible default calling application (such as Skype, Microsoft Teams, or a smartphone dialer) to be installed and configured on your device to successfully initiate a call.
Do I need to be a SharePoint administrator to format list columns?
No, you do not need full administrator privileges. However, you must have at least 'Edit' or 'Design' permission levels on the specific SharePoint list to access the column formatting pane and save your JSON customizations.
Will my JSON formatting work on the SharePoint mobile app?
Most standard JSON formatting works on the mobile app, but complex behaviors might render differently. Always test your 'mailto:' and 'tel:' protocols on both desktop and mobile environments to ensure full compatibility.




