How to Create Hyperlinks from URL Text in SharePoint Online
Question details
The user wants to convert plain URL text into clickable hyperlinks within a SharePoint Online list.

- Product
- SharePoint Online
- Device & OS
- not provided
- Scenario
- Setting up a custom column in SharePoint Online to display URLs as interactive links rather than raw text strings.
- Observed behavior
- Attempting to use HTML anchor expressions within a calculated column fails to render as a clickable hyperlink because the method is no longer supported in SharePoint Online.
Ensure you have 'Design' or 'Full Control' permissions for the SharePoint list to add columns and apply column formatting.
Use JSON Formatting on a Single-Line Text Column
Since SharePoint Online no longer renders HTML in calculated columns for security reasons, you must use JSON column formatting on a standard text column to create a clickable link.
Microsoft deprecated the use of raw HTML markup in calculated columns to prevent cross-site scripting (XSS). The modern and supported approach is to use SharePoint's declarative JSON formatting to transform how field values are displayed.
Navigate to your SharePoint list settings and delete the existing calculated column that attempts to use the HTML anchor expression, as it will not render correctly.
Click 'Add column' in your list view and select 'Single line of text'. Name the column appropriately to store your URL or display value.
Click on the newly created column header, select 'Column settings', and then click 'Format this column'.
Select 'Advanced mode' at the bottom of the formatting pane. Paste a JSON schema that creates an anchor element ('a') and sets the 'href' attribute to the value of your URL field (e.g., "href": "=[$URL]"). Save the changes.

Enhance Your Productivity with WPS Office
If you frequently work with SharePoint documents but are frustrated by Microsoft's complex controls or feature limitations, consider WPS Office. It provides a lightweight, highly compatible, and user-friendly environment for editing Word, Excel, and PowerPoint files natively before uploading them to SharePoint.
- 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
- 2. Install WPS Office: Run the setup file and follow the brief on-screen instructions to install the suite on your device.
- 3. Open Your Documents: Launch WPS Office and directly open your existing Word, Excel, or PowerPoint files to experience seamless editing.

Frequently Asked Questions
Why do HTML anchor tags no longer work in SharePoint calculated columns?
Microsoft disabled the execution of custom HTML markup in SharePoint Online calculated columns to improve platform security and prevent potential cross-site scripting (XSS) vulnerabilities.
How can I make the JSON hyperlink open in a new tab?
When formatting your column with JSON, add the 'target' attribute to your anchor element definition and set its value to '_blank'. This tells the browser to open the link in a new window or tab.
Does JSON formatting alter the underlying list data?
No. JSON column formatting only changes how the data is displayed to the user in the list view. The actual URL text stored in the SharePoint database remains completely unchanged.




