Base64 is what lets binary data travel through a text-only channel: email attachments, a JSON field, an HTTP header, a data URI for a small image.
Two things trip people up. First, base64 is encoding, not encryption. It protects nothing, anyone decodes it in a second, and that is exactly why you can read the middle segment of a JWT here. Second, it grows the data by roughly thirty-three percent, which makes data URIs excellent for a two-kilobyte icon and terrible for a photo.
The integration gotcha is the URL-safe variant. It swaps + and / for - and _, and sometimes drops the trailing =. Pasting that into a plain decoder returns an error or garbage, and the culprit is usually the missing padding, not your key.