News & Updates

How to Quickly Shorten URLs in Excel and Keep Your Sheets Neat

By Julian Ashford 7 min read 4103 views

How to Quickly Shorten URLs in Excel and Keep Your Sheets Neat

Every time you paste a link into a spreadsheet, the cell can balloon, pushing other data into awkward positions. Shortening URLs in Excel not only tidies up your view but also makes your sheets more readable and shareable. This guide walks you through a handful of straightforward methods—from native functions to Power Query, add‑ins, and even Power Automate—so you can keep your links short without sacrificing functionality.

Why Shortening URLs Makes Your Spreadsheet Cleaner

Long URLs clutter cell borders, break wrap‑around formatting, and can hide crucial data in your formulas. By collapsing a 200‑character link down to 10–12 characters, you:

  • Improve readability and navigation.
  • Reduce file size in cloud‑based workbooks.
  • Keep headers and formulas aligned, preventing mis‑alignment.
  • Present a cleaner aesthetic for shared dashboards or reports.

With the right approach, you can automate the trimming process and free up your workspace for analysis rather than formatting.

Option 1 – Built‑in Excel Functions (No Add‑in Needed)

Using CONCATENATE & WEBSERVICE (TinyURL API)

Excel’s WEBSERVICE function lets you call an API directly from a cell. TinyURL offers a simple endpoint that returns a shortened address when you provide the long URL as a query string. Combine that with CONCATENATE (or &) to build the API request:

  • =WEBSERVICE("https://tinyurl.com/api-create.php?url=" & A2)

Assuming A2 holds the original link, the formula returns the shortened URL. Drag the formula down to process an entire column. If you need a fallback for broken URLs, wrap the call in IFERROR:

  • =IFERROR(WEBSERVICE("https://tinyurl.com/api-create.php?url=" & A2), "Error")

Using Power Query for Batch Shortening

Power Query is ideal when you have hundreds of links. Load the column with URLs into Power Query, add a custom column that calls TinyURL, and then load the result back to Excel.

  1. Highlight the column, then Data → From Table/Range.
  2. In the Power Query editor, select Add Column → Custom Column.
  3. Use the formula: Text.FromBinary(Web.Contents("https://tinyurl.com/api-create.php?url=" & [URL])).
  4. Close & Load to place the shortened URLs in a new sheet.

This method keeps the original URLs intact while giving you a clean list of short links.

Option 2 – Third‑Party Add‑ins and APIs

Bitly Integration via Office Scripts

Bitly offers a more robust shortening service that tracks clicks, but it requires an API token. Office Scripts in Excel for the web let you automate API calls without writing VBA.

  1. Go to Automate → New Script and paste a script that sends the long URL to Bitly’s /shorten endpoint using the fetch API.
  2. Store the returned link property in a new column.
  3. Run the script for your selected range.

Bitly’s free tier allows up to 10,000 links per month, enough for most spreadsheets.

Using a Simple VBA Macro

For desktop users, a quick VBA routine can shorten links with minimal setup. Insert a new module and paste the code below:

  • Sub ShortenURLs()

    Dim cell As Range, longURL As String, shortURL As String

    For Each cell In Selection

    longURL = cell.Value

    shortURL = WorksheetFunction.WebService("https://tinyurl.com/api-create.php?url=" & longURL)

    If shortURL <> "" Then cell.Value = shortURL

    Next cell

    End Sub

Select the column with your URLs and run the macro. It overwrites each cell with its shortened version, saving you time on manual edits.

Automating the Process with Power Automate

Step‑by‑Step Flow

Power Automate (formerly Flow) can handle URL shortening every time a file is updated or a new row is added to a SharePoint list. Here’s a quick outline:

  1. Create a Trigger such as “When a file is created or modified (properties only)”.
  2. Add an Action: Get rows from Excel Online to read the sheet.
  3. Loop through each row and use the HTTP action to call TinyURL’s API.
  4. Replace the original URL field with the response using a Update a row action.
  5. Save and test the flow.

Once set, the flow runs automatically, ensuring your spreadsheet always contains clean links without manual intervention.

Tips for Maintaining Shortened Links

  • Keep a separate audit log of original URLs and their shortened counterparts, especially if you need to trace traffic back to the source.
  • Set a naming convention for the shortened URLs column, like ShortURL, to avoid confusion.
  • When using third‑party services, monitor API limits to prevent sudden failures.
  • For corporate environments, consider using a branded shortener (e.g., yourdomain.co) to maintain brand consistency.

FAQ

  • Can I use Excel’s built‑in functions without an internet connection? No. Functions like WEBSERVICE rely on live API calls; you’ll need network access to retrieve shortened links.
  • Do shortened URLs expire? TinyURL links are permanent unless manually deleted. Bitly links can be set to expire after a certain period.
  • Is it safe to share short URLs with colleagues? Short links hide the destination, which can be a security risk. Always verify the target URL or use a service that displays the final destination before sharing.

How to Shorten Url in Excel
Shorten Hyperlinks In Excel at Blake Corlis blog
How to Create Your Own Public URL Shortener
How to Shorten URL from MS Excel Automatically - bit.ly MS Excel ...

Written by Julian Ashford

Julian Ashford is a Chief Correspondent with more than a decade of experience reporting on public affairs, global events, and developing stories. His coverage emphasizes careful sourcing and practical context, giving readers a clearer understanding of significant events and the forces driving them.


You Might Like