Base64 Encoding: What It Is and What It Is Not
Base64 represents binary data using printable ASCII characters. It is common in data URLs, API payloads, certificates and email transport.
Encoding is reversible Base64 does not protect secrecy. Anyone who can see the encoded text can decode it. Never use Base64 as a substitute for encryption, access control or password hashing.
Why the output grows Base64 maps three bytes of input into four printable characters, so the representation is normally larger than the original binary data. It is useful for compatibility, not compression.
Text needs a character encoding Modern text should normally be converted to UTF-8 bytes before Base64 encoding. This matters for emoji, accented characters and non-Latin scripts.
Common mistakes A frequent problem is double encoding—encoding text that is already Base64 and then wondering why one decode step does not restore the original. Another is mixing Base64URL with standard Base64; the alphabets and padding rules differ.
Good uses Use Base64 when a protocol expects it, when embedding small binary values in text, or when moving bytes through a text-only field. Use proper cryptography when you need confidentiality or integrity.
Try the related browser tools from the main navigation, and keep the original data until you have reviewed the transformed result.