How it works
Every three bytes are split into four groups of six bits, and each group is written as one of 64 characters. The output is therefore about a third longer than the input, and is padded with one or two equals signs when needed. “Hello” encodes to SGVsbG8=.
Where it is used
Data URLs for small images in HTML and CSS, email attachments, binary data inside JSON, and parts of tokens and headers.
Not encryption
Anyone can decode Base64, so it protects nothing. Credentials stored as Base64 are as exposed as plain text.
Try it
Use the Base64 Encoder/Decoder for text, or Image to Base64 for pictures. The guide how to encode and decode Base64 has more, and Base64 vs Base32 compares the two.
Common misunderstanding
Base64 does not compress anything; it enlarges it. Its purpose is compatibility, not size.