I\'m sending a link in my web application to users mails (for confirming user registration) as the following :
If you are using ASP.net core you can use WebEncoders.Base64UrlEncode and WebEncoders.Base64UrlDecode