base64url package:fmt

Convert a bytestring to base64url (a variant of base64 which omits / and thus can be used in URLs):
>>> base64UrlF ("\0\50\63\80" :: BS.ByteString)
"ADI_UA=="