Base64 Encoder

Base64 Encoder & Decoder

Encode or decode data using the standard Base64 algorithm. The most common binary-to-text encoding scheme for the web.

2026-03-28T00:00:00Z

Supports standard ASCII and UTF-8 text, including accented characters, symbols, and emoji

Result will appear here...

What is 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.

It 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 text. This ensures that the data remains intact without modification during transport. Base64 encoding is widely used in email via MIME, storing complex data in XML or JSON, embedding images in HTML/CSS (data URIs), and transmitting binary data over text-based protocols.

Unlike encryption, Base64 encoding is not a security measure. It simply converts data into a different format. The encoding is reversible and provides no confidentiality or integrity protection. This tool supports standard ASCII and UTF-8 text; complex binary formats like images require additional processing.

How to Use Base64 Encoding

The Encoding Process

Base64 encoding follows a systematic process:

Step 1: Convert each input byte to binary representation
Step 2: Concatenate all binary values into a single string
Step 3: Split the binary string into 6-bit groups (from left to right)
Step 4: Convert each 6-bit group to its decimal value (0-63)
Step 5: Map each decimal to the Base64 alphabet character
Step 6: Add padding ('=') to make length a multiple of 4

Base64 Alphabet

The standard Base64 alphabet consists of 64 characters:

A-Z: Values 0-25
a-z: Values 26-51
0-9: Values 52-61
+, /: Values 62-63
=: Padding character

Example Encoding

Let's encode the word "Man":

Given:
Input text: "Man"
Step 1:
Convert to ASCII values:
M = 77, a = 97, n = 110
Step 2:
Convert to 8-bit binary:
01001101 01100001 01101110
Step 3:
Split into 6-bit groups:
010011 | 010110 | 000101 | 101110
Step 4:
Convert to decimal:
19, 22, 5, 46
Step 5:
Map to Base64 alphabet:
T, W, F, u
Final Output:
TWFu

Frequently Asked Questions

Is Base64 encryption?

No, Base64 is an encoding scheme, not encryption. It does not provide security, confidentiality, or secrecy. Anyone can easily decode Base64 data. Use encryption algorithms like AES or RSA for security.

Why is padding used?

Padding with "=" characters ensures the encoded string has a length that is a multiple of 4. This helps decoders determine exactly how many bits were in the original data, especially when the input length is not divisible by 3.

Can I encode images and files?

Base64 is frequently used to represent binary files like images, PDFs, and audio as text. This text-only tool works with text input and output, so raw binary files would need separate file-processing steps before or after conversion.

Is Base64 URL-safe?

Standard Base64 is not URL-safe because it uses "+" and "/" characters which have special meaning in URLs. A URL-safe variant (RFC 4648 §5) replaces these with "-" and "_" for safe use in URLs and filenames.

Does Base64 compress data?

No, Base64 actually expands data size by approximately 33%. Every 3 bytes of input becomes 4 bytes of output. It is used for compatibility with text-based systems, not compression.

When should I use Base64?

Use Base64 when you need to transmit binary data through text-only channels such as email, JSON, or XML, embed images in CSS or HTML, or safely move byte-oriented content through systems that expect text.

How do I decode Base64?

Switch to Decode mode in this tool and paste your Base64 string. The process reverses the encoding by converting Base64 characters back to bytes and then decoding those bytes as UTF-8 text.

What is the character set?

Base64 uses 64 characters: uppercase A-Z (26), lowercase a-z (26), digits 0-9 (10), plus "+" and "/" (2). The "=" character is used only for padding, not encoding actual data.

Related Tools