What Base64 is for
Base64 represents binary data using 64 safe characters, so it can travel through text-only places: JSON, email, HTML and CSS data URLs, HTTP headers and environment variables. It makes data about a third larger and is not encryption — anyone can decode it.
URL-safe Base64 (Base64URL) swaps + and / for - and _ and usually drops the = padding. It's used in JWTs and URLs. The decoder accepts both.