Decode your URLs

Today, I read Terence Eden’s article about the abundance of Microsoft’s safelinks systems. One example he gives is

As my work email is hosted by Microsoft, I’m bugged to no end by this system, which doesn’t make it easy to extract the URL in a readable format (read the blog if you want to know more shortcomings of the system).

For a couple of years, I have a Typinator snippet that decodes the URL, so that by typing ;dec, the following script is triggered

let URI = "{clip}".split("=", 2)[1].replace("&data", "")
let encURI = decodeURIComponent(URI)


Converting the above link to

The script is not perfect, but, since defining it, Typinator analytics tell me I’ve used it some hundred times and I can’t recall when it didn’t just work.