Plain ASCII
Input
Hello, World!Output
SGVsbG8sIFdvcmxkIQ==Thirteen bytes become 20 characters, padded with == to reach a multiple of four.
Further reading
Base64 represents binary data using 64 printable ASCII characters, so it can travel safely through channels that expect text: email bodies, JSON fields, HTTP headers, data URLs and XML documents.
Base64 encodes bytes, not characters. This tool converts text to UTF-8 first, so ordinary multilingual text and emoji can round-trip through the paired decoder. This is not a guarantee for every JavaScript string: unpaired UTF-16 surrogates become replacement characters, and the decoder consumes an initial UTF-8 byte-order mark.
Each example below is executed against this tool by the test suite, so what you see is what the tool actually produces.
Input
Hello, World!Output
SGVsbG8sIFdvcmxkIQ==Thirteen bytes become 20 characters, padded with == to reach a multiple of four.
Input
héllo 😀Output
aMOpbGxvIPCfmIA=The accented e takes two bytes and the emoji four, so the output is longer than the character count implies.
The details that decide whether a conversion is correct, and where information can be lost without any error being raised.