Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. Let's explore what it is and when to use it.

What is Base64?

Base64 encoding converts binary data into a set of 64 printable ASCII characters. It's commonly used when you need to transmit binary data over media designed for text.

How It Works

Base64 takes 3 bytes (24 bits) of binary data and converts them into 4 ASCII characters:

  • Each character represents 6 bits of data
  • The character set includes A-Z, a-z, 0-9, +, and /
  • Padding with = is used when input isn't divisible by 3

Common Use Cases

  • Email attachments - MIME encoding for binary files
  • Data URLs - Embedding images in HTML/CSS
  • API payloads - Transmitting binary data in JSON
  • Authentication - Basic HTTP authentication headers

Important

Base64 is NOT encryption! It's just encoding. Anyone can decode Base64 data.

Size Overhead

Base64 encoding increases data size by approximately 33%. For every 3 bytes of input, you get 4 bytes of output.

Try Our Base64 Encoder

Encode and decode Base64 strings instantly.

Open Base64 Encoder