How Base64 Encoding Works
Base64 maps every 3 bytes of input to 4 ASCII characters, which is why encoded output is roughly 33% larger than the original. It exists so binary data can travel through systems that only handle text - email bodies, JSON documents, URLs, HTML attributes. Encoding and decoding here happen entirely in your browser. The alphabet, the padding rules and the common pitfalls are covered in Base64 encoding explained.
The URL-safe variant replaces + and / with - and _ so encoded data survives inside URLs and HTTP headers - it is the variant JWT tokens use for all three of their segments. For embedding images in HTML or CSS as data URIs, the Image to Base64 converter handles files directly; for plain text, paste it here.