Base64 Encoder/Decoder

Encode or decode Base64 strings

Input
Output

About Base64 Encoder/Decoder

Base64 is a binary-to-text encoding scheme that represents binary data as ASCII strings. It's commonly used for embedding images in CSS/HTML, encoding data in URLs, transmitting binary data over text-based protocols like email (MIME), and storing complex data in JSON or XML. This tool supports UTF-8 text.

Q: Does this tool support non-ASCII characters?
Yes. The encoder handles UTF-8 text correctly by first converting to UTF-8 bytes before Base64 encoding, so characters like emoji and CJK text work properly.
Q: What's the difference between Base64 and Base64URL?
Standard Base64 uses + and / as special characters, while Base64URL replaces them with - and _ to be URL-safe. This tool uses standard Base64.
Q: Why does Base64 increase the data size?
Base64 encodes 3 bytes of binary data into 4 ASCII characters, resulting in roughly 33% size increase. This overhead is the trade-off for safe text-based transmission.