How to encode and decode Base64 in VB.NET

Because sometimes you just need a string with ‘normal characters’ instead of funky ones…

Public Function EncodeBase64(input As String) As String
	Return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(input))
End Function

Public Function DecodeBase64(input As String) As String
	Return System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(input))
End Function

Have a nice day!