Problems with URL is you can not pass everything to the internet, like spaces some special chars – ~ : \ / ? etc which could cause some issues and are not valid for a URL format. So you’ve to change them to a valid ASCII format which is accepted in a URL format so here is a quick PowerShell tip –
Changing a URL candidate to valid ASCII format is called URL Encoding and can be done like in the below image using System.Web.HttpUtility class in .Net framework. You can also perform its reverse which is call URL Decoding.
You can read more about the what and the whys of these terms on the World Wide Web Consortium site HERE