How Base64 Encoder / Decoder works
Base64 encode and decode handles both text strings and binary files in one place. Paste or type text to get the Base64 representation, or drop any file, an image, a certificate, a PDF, to get its Base64 string ready to embed in data URIs, email attachments or API payloads. Decoding works in reverse for both text and files.
It reads files with the FileReader API and converts the raw bytes with the built-in btoa/atob routines of the browser. A URL-safe variant swaps + and / for - and _ so the output can sit in a URL or filename without percent-encoding.