ToolsTechBox

ToolsTechBox Guide

What Is Base64 Encoding?

How 3 bytes become 4 characters — and why every developer needs to know this.

← Use the Free Base64 Encoder/Decoder

Why Base64 Exists

Many communication channels — email (SMTP), HTML, JSON, URLs — were designed to handle plain text only. Binary files (images, PDFs, certificates) contain arbitrary byte values including null bytes and control characters that break these channels. Base64 solves this by encoding any binary data into a safe 64-character alphabet.

The Base64 Alphabet

A–Z (0–25) a–z (26–51) 0–9 (52–61) + (62) / (63) Padding: =

How Encoding Works

1. Take 3 bytes (24 bits) of input 2. Split into 4 groups of 6 bits 3. Map each 6-bit value to the Base64 alphabet 4. If input isn't divisible by 3, add = padding "Hi" → 01001000 01101001 Split: 010010 | 000110 | 1001(00) Map: S | G | k | = Result: SGk=

Base64 in Practice

Base64 Is NOT Encryption

This is the most common misconception. Base64 is an encoding, not encryption. It is completely reversible with zero secret keys. Never use it to secure sensitive data. Use TLS, AES, or bcrypt for security.

Size Overhead

Base64 increases data size by approximately 33% (4 output bytes per 3 input bytes). This is the trade-off for text-safe transmission.

Encode or decode any text or data to Base64 instantly — runs entirely in your browser.

Try the Base64 Encoder →