Base64 Pillar Guide

What is Base64? — A Complete Guide

What is Base64 encoding? Learn how it works, why it exists, how to use it, and why it's NOT encryption. Simple explanation with examples.

Understanding Base64 Encoding

Base64 is a binary-to-text encoding scheme defined in RFC 4648. It converts arbitrary binary data—such as images, PDF files, executable code, or non-ASCII text—into a clean stream of printable 7-bit ASCII characters.

The Base64 alphabet consists of 64 standard characters: uppercase letters A-Z, lowercase letters a-z, numbers 0-9, the plus sign (+), and the forward slash (/). The equals sign (=) is reserved for byte alignment padding.

How the Base64 Algorithm Works

Standard computer systems store data in 8-bit bytes. Base64 processes data in 24-bit blocks (3 bytes at a time) and splits those 24 bits into four 6-bit segments (2^6 = 64). Each 6-bit segment maps directly to one character in the 64-character alphabet table.

Algorithm Example: Encoding "Man":

Input text: "Man"

ASCII values: 77, 97, 110

Binary representation: 01001101 01100001 01101110 (24 bits)

Split 6-bit groups: 010011 | 010110 | 000101 | 101110

Decimal indices: 19, 22, 5, 46

Base64 output: T | W | F | u → "TWFu"

Why Does Base64 Increase File Size?

Because Base64 uses 4 ASCII characters (32 bits) to represent 3 original binary bytes (24 bits), the encoded string size is always exactly 33.3% larger than the original raw data.

Try Online Tools

Need to decode or encode strings, files, or images? Use our suite of 100% client-side tools: