Base64 Encode

Encode text to Base64 instantly. Free online Base64 encoder with support for UTF-8 and other encodings.

💡 Enter text → get Base64. Example: "Hello" → "SGVsbG8=".

0

How to Encode Text to Base64

Step-by-step guide with examples

Input
Convert
Result
1

What is Base64 Encoding?

Base64 encoding converts binary data into a text-safe format using 64 ASCII characters (A-Z, a-z, 0-9, +, /). It’s used to transmit binary data over text-based protocols like email (MIME) and HTTP.

2

How Base64 Encoding Works

1. Convert the input text to bytes using the selected encoding. 2. Group bytes into 3-byte (24-bit) blocks. 3. Split each block into four 6-bit values. 4. Map each 6-bit value to a Base64 character. 5. Pad with ‘=’ if the input doesn’t divide evenly. Example: "Hi" → bytes 72,105 → Base64 "SGk="

3

Common Use Cases

• Embedding images in HTML/CSS (data URIs). • Sending binary data in JSON APIs. • Email attachment encoding (MIME). • Storing binary data in XML or config files. • JWT token encoding.

Frequently Asked Questions

4 common questions answered

4 Questions4 AnswersClick to expand
Q1What is Base64 encoding?
Base64 is a binary-to-text encoding that represents binary data in an ASCII string using 64 characters. Each Base64 character represents 6 bits of data.
Q2How to encode text to Base64?
Paste text into our encoder, select the character encoding (default UTF-8), and get the Base64 string instantly. You can also upload a file.
Q3Is Base64 encryption?
No. Base64 is encoding, not encryption. Anyone can decode it. Don’t use it to protect sensitive data.
Q4What is binary to Base64?
Binary to Base64 converts raw binary data into Base64 text. Our tool first encodes text to binary bytes, then to Base64.