How to convert url text to clickable hyperlink in Excel?
In many practical situations, you may receive Excel files with a list of URLs that appear as plain text rather than as clickable links. As shown in the screenshots below, these unlinked URLs are simply text strings and cannot be accessed directly with a click, which can be inconvenient when you need to visit or share those web pages frequently. While Excel does allow you to manually make each URL clickable by editing each cell, this approach quickly becomes tedious and time-consuming, especially if you have a large dataset.
![]() | ![]() | ![]() |
Convert url text to clickable hyperlink with VBA code
VBA provides a flexible way to automate repetitive Excel tasks, making it especially useful for handling large numbers of rows. For users comfortable with macros, the following VBA code can batch-convert many unlinked URL text entries into active, clickable hyperlinks in a single operation. This approach is helpful when you want to overwrite the original URL cells with hyperlinks or process varied data ranges in one go.
1. Hold down the ALT + F11 keys to open the Microsoft Visual Basic for Applications editor.
2. In the VBA editor, click Insert > Module. Then, paste the following code into the code window that appears.
Sub ConvertToHyperlinks()
'Updateby Extendoffice
Dim Rng As Range
Dim WorkRng As Range
On Error Resume Next
xTitleId = "KutoolsforExcel"
Set WorkRng = Application.Selection
Set WorkRng = Application.InputBox("Range", xTitleId, WorkRng.Address, Type:=8)
For Each Rng In WorkRng
Application.ActiveSheet.Hyperlinks.Add Rng, Rng.Value
Next
End Sub
3. Press the F5 key or click Run to execute the code. A dialog box will prompt you to select the range you want to process—ensure your range is correct before confirming. Once you click OK, all unlinked URLs in your selection will be converted to active hyperlinks.
![]() | ![]() | ![]() |
- Always back up your data before running VBA macros, as this method overrides content in the selected cells.
- If your worksheet is protected, you need to unprotect it before running the macro.
- This solution is efficient for large batches of URLs and when you are experienced with macros, but users unfamiliar with VBA may prefer the other solutions below.
- If some cells contain non-URL text or already valid hyperlinks, review the result to ensure no unintended hyperlinks were created.
Convert url text to clickable hyperlink with Kutools for Excel
If working with VBA feels complex or you prefer a graphical interface, Kutools for Excel offers a more intuitive solution. With its versatile Convert Hyperlinks feature, you can swiftly perform several hyperlink-related tasks, such as:
- Extracting actual addresses from existing hyperlinks;
- Batch converting plain url text to clickable hyperlinks;
For those who have already installed Kutools for Excel, follow these straightforward steps:
1. Choose the range of cells containing the textual URLs you wish to convert.
2. Navigate to Kutools > Link > Convert Hyperlinks on the ribbon, as illustrated below:
3. In the pop-up Convert Hyperlinks dialog box, select the option Cell contents replace hyperlinks addresses. Then click the button to specify the Result range—this allows you to choose where the new clickable hyperlinks will be placed. You can select a different column or the original range, depending on whether you want to overwrite or keep the original data.
4. Click OK. All selected text URLs will instantly become clickable hyperlinks in your chosen result range. The following screenshot shows the final outcome:
- Choose Convert source range if you would like the hyperlinks to overwrite the original URL text directly. Choosing a different range allows you to keep both the original and new data side-by-side for comparison.
- If you are linking to locations within the current workbook (such as worksheet cells or named ranges), check Hyperlinks is a place in this document for accurate results—this is particularly useful when managing internal navigation links.
- Always preview the result if your data includes mixed content, such as email addresses or malformed URLs, as only valid URLs will be converted into functioning hyperlinks.
This method is efficient and user-friendly, ideal for users who do not want to manage or edit macros and prefer a ready-made graphical tool for batch hyperlink creation.
Convert url text to clickable hyperlink with Excel Formula (HYPERLINK function)
For users who prefer a formula-based solution or need to quickly generate hyperlinks without using macros or add-ins, Excel's HYPERLINK function is a reliable option. This method is particularly helpful when you wish to keep both the original URL text and the generated clickable hyperlink, or when working in restricted environments where VBA/macros are disabled and add-ins cannot be installed.
1. Suppose your plain-text URLs are in column A, starting at cell A2. Click to select cell B2 (or the first cell in your helper column next to your data), and enter the following formula:
=HYPERLINK(A2, A2)
This formula creates a hyperlink in cell B2 that displays and links to the same URL as in cell A2.
2. Press Enter to apply the formula to the cell.
3. To quickly convert all URL text to clickable hyperlinks for the entire list, position your mouse in the lower-right corner of cell B2 (the fill handle), then drag down to fill the formula for other rows. Alternatively, double-click the fill handle if column A is continuous, and Excel will automatically fill down as far as your data goes.
4. If needed, you can copy the results and use Paste Values to replace the original text URLs with their clickable equivalents, or keep both columns for reference.
- If you see errors (such as
#VALUE!
), double-check that the original cell contains a valid URL format (for example, beginning withhttp://
orhttps://
), since the HYPERLINK function requires a valid address. - To display different text instead of the raw URL, modify the formula as this, which creates a clickable link with custom display text.
=HYPERLINK(A2, "Visit Site")
- When working with a large volume of data, Excel formulas update dynamically—deleting or changing the original text will automatically update associated hyperlinks.
Advantages: The formula approach avoids direct data modification and can be easily copied or referenced in other calculations. Also, it is quick to implement for small to moderately sized datasets.
Limitations: This method requires the use of helper columns and may not scale as elegantly as automated tools for vast datasets.
Overall, the formula method is an excellent lightweight alternative for straightforward URL-to-hyperlink conversion, especially for users who prefer built-in Excel solutions with no add-ins or code.
In summary, converting plain URL text to clickable hyperlinks in Excel can be accomplished using VBA scripts, the Kutools for Excel add-in, or the built-in HYPERLINK formula, each tailored to different usage scenarios and user preferences. Always consider data backup before performing batch operations, and verify the accuracy of your results after conversion. If problems arise (such as non-hyperlinked cells, formula errors, or add-in limitations), recheck your data format, tool settings, and cell references, or try an alternative method from those introduced above to complete the task smoothly.
Demo: Convert url text to clickable hyperlink with Kutools for Excel
Related article:
How to extract actual addresses from hyperlinks in Excel?
Best Office Productivity Tools
Supercharge Your Excel Skills with Kutools for Excel, and Experience Efficiency Like Never Before. Kutools for Excel Offers Over 300 Advanced Features to Boost Productivity and Save Time. Click Here to Get The Feature You Need The Most...
Office Tab Brings Tabbed interface to Office, and Make Your Work Much Easier
- Enable tabbed editing and reading in Word, Excel, PowerPoint, Publisher, Access, Visio and Project.
- Open and create multiple documents in new tabs of the same window, rather than in new windows.
- Increases your productivity by 50%, and reduces hundreds of mouse clicks for you every day!