Base64 is a way of representing arbitrary binary or text data using only 64 printable ASCII characters (A–Z, a–z, 0–9, +, /). It's used everywhere data needs to safely travel through text-only channels — embedding images in CSS/HTML, encoding attachments in emails, storing binary data in JSON, or passing data in URLs and API tokens — because many of those channels can't reliably handle raw binary bytes.
Encoding takes your text's raw UTF-8 bytes and groups them into 3-byte chunks, converting each chunk into 4 Base64 characters (padding with "=" at the end if the input length isn't a multiple of 3). Decoding reverses this exactly, converting the Base64 characters back into bytes and then interpreting those bytes as UTF-8 text. Because of this 3-to-4 byte expansion, encoded output is always about 33% longer than the original.