What Base64 is
Base64 is an encoding that represents binary data using 64 printable characters: A-Z, a-z, 0-9, plus "+" and "/". It lets you carry images, files, or any bytes through channels that only handle text - like JSON, email, or a URL.
How it works
Base64 takes data 3 bytes at a time (24 bits) and splits it into four 6-bit groups, mapping each group to one character. When the input is not a multiple of 3 bytes, one or two "=" signs are added as padding. Because 3 bytes become 4 characters, the output is about 33% larger than the input.
When to use it - and not
Use Base64 for data URIs (embedding a small image in CSS/HTML), email attachments (MIME), and moving binary tokens through text APIs. Do not use it for security: it is fully reversible with no key, so it hides nothing.