Developer guide
Base64 Explained
Understand how Base64 represents binary data as text and where it should and should not be used.
Base64 converts bytes into a text alphabet so binary data can travel through systems designed for text. It is an encoding, not encryption, and anyone can decode it.
How it works
Base64 groups input bytes and maps them to a set of 64 printable characters. The encoded output is larger than the original, commonly by about one third, before any surrounding transport overhead.
Good use cases
It is useful for small data embedded in text formats, email-safe transport, and data URLs. It is less suitable for large files because the size expansion increases memory and transfer costs.
Encoding is not security
Base64 has no secrecy. Never use it as a replacement for encryption, access control, or password hashing. Protect sensitive data with the security mechanism designed for that job.
Put it into practice
Encode with Base64