Base64 Encode Tool

Encode text to Base64 format with ease right in your browser.

Base64 Encoder

About Base64 Encoding

Base64 is a group of binary-to-text encoding schemes that represent binary data in an ASCII string format by translating it into a radix-64 representation. The term Base64 originates from a specific MIME content transfer encoding.

Each Base64 digit represents exactly 6 bits of data. Three 8-bit bytes (i.e., a total of 24 bits) can therefore be represented by four 6-bit Base64 digits.

Original Data Bit Representation Base64 Encoding
A 01000001 QQ==
AB 01000001 01000010 QUI=
ABC 01000001 01000010 01000011 QUJD

Base64 is commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with textual data. This is to ensure that the data remains intact without modification during transport.

Common Use Cases for Base64 Encoding

Email Attachments

Base64 is used to encode email attachments so they can be transmitted over SMTP, which is designed to handle plain text.

Data URIs

In web development, Base64 is used to embed images and other files directly into HTML, CSS, or JavaScript as Data URIs.

Authentication

Basic authentication in HTTP uses Base64 to encode credentials before transmitting them over the network.

Data Storage

Base64 encoding is used to store binary data in databases that can only store text-based data.

XML/JSON Data

Binary data is often encoded as Base64 when included in XML or JSON documents to ensure data integrity.

Data Transmission

When transferring data between systems that do not support binary data transfer, Base64 provides a reliable solution.

Related Tools