SharePoint Document Issues

How to Create Hyperlinks from URL Text in SharePoint Online

Emma BrownEmma Brown Nov 3, 2026 870 views

Question details

The user wants to convert plain URL text into clickable hyperlinks within a SharePoint Online list.

How to Create Hyperlinks from URL Text in SharePoint Online
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.
Before you start

Ensure you have 'Design' or 'Full Control' permissions for the SharePoint list to add columns and apply column formatting.

Solution 1Recommended

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.

1
Delete the Calculated Column

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.

2
Create a New Text Column

Click 'Add column' in your list view and select 'Single line of text'. Name the column appropriately to store your URL or display value.

3
Access Column Formatting

Click on the newly created column header, select 'Column settings', and then click 'Format this column'.

4
Apply the JSON Schema

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.

Use JSON Formatting on a Single-Line Text Column
JSON Formatting Resources: You can find exact code samples for turning field values into hyperlinks on Microsoft's official documentation for SharePoint declarative customizations.
Free Microsoft Office alternative

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. 1. Download the Installer: Visit the official WPS Office website and download the free installer for your operating system.
  2. 2. Install WPS Office: Run the setup file and follow the brief on-screen instructions to install the suite on your device.
  3. 3. Open Your Documents: Launch WPS Office and directly open your existing Word, Excel, or PowerPoint files to experience seamless editing.
Fully compatible with Microsoft Office formats including .docx, .xlsx, and .pptxEasily add, edit, and manage hyperlinks in documents without writing complex codeLightweight software with rapid startup timesA familiar user interface that requires zero learning curve for Office users
microsoft office alternative - wps office

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.