Apple Shortcut to clean URLs

I made an Apple Shortcut that cleans URLs–removes query parameters (the stuff after the ? in the URL, as well as converting Google AMP URLs to basic ones.

This lets you both clean single or mutliple URLs before sharing, as well as before opening them yourself. Here’s more info. Happy to accept feedback here or on RoutineHub, where it’s published.

RoutineHub Link - this link will always have the latest link to the Shorcut link on iCloud

iCloud Link - may be outdated if I forget to update here

More info:

Clean URLs

About

This shortcut cleans URLs by:

  • removing querystring (tracking) parameters (the extra characters at the end of the URL begining with “?”
  • converting Google AMP links to regular links

Note: URLs that have been shortened by link shorteners like is.gd or bit.ly are currently not expanded before processing. This is because such links may themselves be tracked.

Usage

Share individual URLs or text containing one or multiple URLs to the Shortcut.
Alternatively, run the Shortcut with text containing URLs in your clipboard.

If this Shortcut receives multiple URLs, it offers a menu to select which URLs to clean and then output.

Once the URLs are cleaned, choose your action:

  • Copy: Copy the cleaned URL(s) to the clipboard
  • Open: open the cleaned URL(s) in the browser
  • View/Share: View a text list of the cleaned URL(s). Individual or all URLs can be copied from here. To share the output, click/tap the share button.

Updating This Shortcut

You can check for updates to this Shortcut manually or automatically.

Checking RoutineHub

You can check this Shortcut’s RoutineHub page to see if updates are available.

Using Swing Updater

To enable the Swing Updater shortcut to check for updates, change the Number field labeled with a comment to the number 1.

(Due to a bug in Apple Shortcuts, you have to do this manually right now, rather than using the Shortcuts import questions, which would have been more convenient). This also means that each time you update, you need to update the Number field to 1 again to re-enable updating, since the default is 0.

If enabled:

  • Be sure you’ve installed Swing Updater, or this Shortcut will throw an error.
  • This Shortcut will ask permission to save information about itself (its name, version number, RoutineHub ID) to a file on your iCloud drive, so Swing Updater can check whether updates are available
  • No info from what you share to this Shortcut is shared with anyone or anything else
1 Like

Why does your URL shortener require an account?

It doesn’t.

I think you might be referring to RoutineHub, which is the site that I’m using to host the info about the shortcut. Accounts there are optional. The shortcuts listed there are all iCloud links, created with the usual share method from within the Shortcuts app.