What Base64 is and is not
Base64 represents binary data using 64 printable characters: A to Z, a to z, 0 to 9, plus + and /. Every 3 bytes become 4 characters, so the encoded output is about 33% larger than the input. It is used to embed binary data in text-only formats such as JSON, email and HTML data URIs.
Base64 is an encoding, not encryption. Anyone can decode it instantly, so never use it to hide passwords or secrets.
Why Unicode needs special care
The browser's built-in btoa function only accepts characters in the Latin-1 range and throws an error for text like Japanese or Hindi. This tool first encodes text with TextEncoder into UTF-8 bytes and then Base64-encodes those bytes. Decoding reverses the process with a strict UTF-8 decoder, so corrupted input is reported rather than turning into garbled characters.