What Base64 is for
Base64 represents binary data using 64 printable ASCII characters so it can travel through systems built for text, such as JSON, e-mail, HTML and HTTP headers.
It is an encoding, not encryption: anyone can decode it, so never use it to protect secrets.
UTF-8 and URL-safe Base64
Text is first converted to UTF-8 bytes, so accents, CJK characters and emoji round-trip without corruption.
The URL-safe variant replaces + and / with - and _ and drops the = padding, which makes the result safe to place in URLs, file names and JWTs.
Files and data URLs
- Choose a file to get a complete data URL such as data:image/png;base64,...
- Paste it into CSS, HTML or JSON to embed small images and fonts
- Base64 makes data about 33% larger, so keep it for small files

