What Base64 is
Base64 represents binary data using 64 printable ASCII characters. It is used to embed data in text formats such as JSON, HTML and email. The output is about one third larger than the input.
Base64 is not encryption
Anyone can decode Base64, so never use it to protect secrets. It only changes how data is represented.
Unicode handling
Text is converted to UTF-8 bytes before encoding and decoded as UTF-8 afterwards, so characters outside basic ASCII round-trip correctly. The decoder also accepts the URL-safe alphabet (- and _).