Base64
Also known as: Base-64, Base 64 encoding
Base64 is a way of encoding arbitrary binary data as a string of 64 ASCII characters (A–Z, a–z, 0–9, '+', '/') so it can travel through systems that only handle plain text — like email, URLs, JSON, or HTML data URIs.
Overview
Base64 takes three bytes of input at a time (24 bits) and emits four output characters (6 bits each). The output is exactly 4/3 the size of the input, padded with '=' characters when the input length is not a multiple of three. Because every output character is a printable ASCII letter, digit, or punctuation mark, the encoded string survives transport through text-only channels without escaping or corruption. Base64URL is a URL-safe variant that swaps '+' and '/' for '-' and '_' — the encoding JWTs use for their three segments.
Base64 is not encryption. Anyone who sees a Base64 string can decode it back to the original bytes in milliseconds — there is no key, no secret. Treat it strictly as a transport encoding.