HOW IT WORKS
RFC 4648 Base64 encoding with UTF-8
Base64 converts arbitrary binary bytes into a 64-character ASCII alphabet (A–Z, a–z, 0–9, +, /) so text and payloads survive text-only protocols like email, JSON, and HTTP headers.
UTF-8 Byte Serialization
Unlike legacy btoa() which fails on non-Latin1 characters, this tool encodes text into UTF-8 bytes via TextEncoder first so accents and emoji round-trip losslessly.
6-Bit Grouping & Padding
Every 3 bytes (24 bits) map to 4 Base64 characters (6 bits each), padded with = when input length is not a multiple of 3.
Base64URL Mode (RFC 4648 §5)
Replaces + with - and / with _ and omits = padding for safe use in URLs and JWTs.