What Base64 is for
Base64 encodes arbitrary binary data using only 64 characters that survive being passed through systems built for text. Email attachments, data URIs in CSS, JSON Web Token segments and HTTP basic auth headers all rely on it.
It is worth being blunt about what it is not: Base64 provides no security whatsoever. There is no key, and decoding is a single function call. Credentials sent as Base64 in an HTTP header are transmitted in effectively plain text, which is exactly why basic auth requires HTTPS.
UTF-8 and the btoa problem
The browser's built-in btoa() only accepts characters in the Latin-1 range. Feed it café and it throws an InvalidCharacterError. The fix is to encode the text to UTF-8 bytes first and Base64 those bytes — which is what this tool does, so any text works, including emoji and non-Latin scripts.
Related tools
To encode an image file as a data URI for inlining in CSS or HTML, use the image to Base64 converter. To inspect a JSON Web Token — which is three Base64url segments — use the JWT decoder. For irreversible hashing, use the hash generator.