Topic
Base64 encoding
Base64 is a binary-to-text encoding that represents bytes using a limited alphabet so binary data can travel through text-oriented systems.
At a glance
- Purpose
- Binary-to-text encoding
- Security property
- None by itself
Overview
Base64 converts groups of bytes into printable characters. It is an encoding, not encryption: anyone who has the text can decode it back to the original bytes. The representation is larger than the original binary data, so it is useful when a text-only transport requires it but is inefficient as a general replacement for binary storage or transfer.
Encoding is reversible
The Base64 alphabet maps binary values into text characters according to a defined scheme. Padding can appear at the end depending on the number of input bytes, and related URL-safe variants substitute characters that are easier to use in URLs and filenames.
Do not confuse encoding with secrecy
Base64 output can look opaque to a person but does not conceal the underlying content from an attacker or recipient. Passwords, tokens, and other secrets require appropriate cryptographic protection and access controls rather than merely being Base64-encoded.
Sources and review
MOOR's explanatory text is supported by the following source links.
- The Base16, Base32, and Base64 Data Encodings — RFC Editor
- Base64 glossary — MDN Web Docs