Encodes a string or byte array into an unpadded URL-safe Base64 string (RFC 4648 ยง5).
Replaces + with -, / with _, and strips trailing padding =.
+
-
/
_
=
The string or byte array to encode.
The URL-safe Base64-encoded string without padding.
const encoded = base64UrlEncode("sub=12345"); Copy
const encoded = base64UrlEncode("sub=12345");
Encodes a string or byte array into an unpadded URL-safe Base64 string (RFC 4648 ยง5).
Replaces
+with-,/with_, and strips trailing padding=.