56 free macros indexedAll toolsHow to runBlogGitHub ↗

Convert Hyperlinks to Plain Text

Extract the URL from each hyperlinked cell and replace the cell content with the plain URL text

windows · mac · Excel 2016+ · Free


What it does

You have a column of clickable hyperlinks. Each cell shows a friendly text like Click to view but the underlying URL is what you actually need. Maybe you're feeding the URLs into another system, or you need them in plain text for a script, or you want to share without the click-and-redirect risk. The macro extracts the URL from each hyperlinked cell, removes the hyperlink object, and replaces the cell content with the plain URL text.

Real-world example

Picture a content marketing analyst at an e-commerce company auditing the company's outbound email links. The marketing automation platform exported the click-tracking report as Excel. The "Link" column shows clickable links labeled with the call-to-action text (Shop the sale, Read the full article). The actual destination URL lives behind each one. Her audit needs the destination URLs in plain text so she can paste them into the link-checker tool.

Her current method: right-click each cell, Edit Hyperlink, copy the URL from the dialog, paste back into the cell, OK. About 30 seconds per cell. With 180 rows in the report, that's 90 minutes of right-click-and-paste, plus a few cells where she pastes the wrong thing and has to redo.

With this macro she selects the link column, runs the tool, and 180 hyperlinks become 180 plain URL strings in 1 second. The popup confirms count. She copies the column and pastes into the link-checker.

On a 180-row link audit, expect about 85 minutes saved per audit. Across the four audits she does per year, that's nearly 6 hours back, plus zero risk of accidentally pasting the wrong URL into the wrong cell.

How to use

First time? See How to run our tools for the 30-second setup.

  1. Select the range of cells with hyperlinks.
  2. Press Alt + F8 (Windows) or Option + F8 (Mac), pick ConvertHyperlinksToText, click Run.
  3. The macro extracts each cell's URL, removes the hyperlink object, and writes the URL as plain text. Popup reports the count.

FAQ

What if a cell has multiple hyperlinks?

The macro keeps the first hyperlink's URL. Most Excel cells have at most one hyperlink (Excel only renders the last-added one), so this rarely matters in practice. If your data has multiple URLs per cell, the macro is the wrong tool; use Extract Email Addresses From Text as a starting template for a multi-extraction macro.

What if the cell has friendly text instead of the URL as its display value?

The cell content gets replaced with the URL after the macro runs. So Click to view becomes https://example.com/page. If you want to keep the friendly text alongside the URL, copy the column first, run the macro on the copy, then your two columns side by side give you both views.

Will it remove hyperlinks that aren't URLs (like internal sheet references)?

The macro extracts the Address property of the hyperlink, which for internal links includes the sheet name and cell reference. So an internal hyperlink to 'Sheet2'!A1 becomes the text 'Sheet2'!A1. For external URLs, you get a clean URL string.

Can I extract URLs without removing the hyperlinks?

No, this macro replaces the cell content. To keep the hyperlinks while also having the URL text, copy the column to a new column, then run the macro on the copy.

Can I undo it?

Yes, Ctrl/Cmd + Z right after running undoes the conversion. As always, work on a copy of the file first if you want a backup. The macro runs entirely offline.

Did this tool work for you?

One click. We use this to fix tools that don't work and prioritize what to build next.

Related tools