Base64 Encode / Decode

Convert between plain text and Base64 encoding

0 characters

About the Base64 Encoder / Decoder

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It is commonly used to encode data for transmission over media designed to handle textual data, such as email attachments (MIME), data URIs in web pages, and storing complex data in JSON or XML.

How It Works

Base64 converts every 3 bytes (24 bits) into 4 Base64 characters, each representing 6 bits. Padding (=) is added to make the output length a multiple of 4.

Frequently Asked Questions

Is Base64 encryption or compression?

No. Base64 is neither encryption nor compression. It is an encoding scheme that increases data size by approximately 33%. Anyone can decode Base64 without a key, so it should never be used to protect sensitive data. Use proper encryption (AES, etc.) for security.

When should I use Base64 encoding?

Base64 is useful when you need to transmit binary data (images, files) through text-based protocols like HTTP, email (SMTP), or embed data in HTML/CSS as data URIs. It is also commonly used for storing binary data in JSON or XML documents.