Base64 Encoder/Decoder

Encode and decode Base64 text.

How to Do It Manually

Base64 encodes binary data into ASCII text using 64 printable characters (A–Z, a–z, 0–9, +, /). Padding '=' ensures output is divisible by 4.

  1. Convert input to binary (8 bits per character).
  2. Group into 6-bit chunks.
  3. Map each 6-bit group to a Base64 character.
  4. Pad with '=' if needed to reach a multiple of 4 characters.

Frequently Asked Questions

Why use Base64?

Encodes binary data safely in text format, useful for emails, URLs, and data transmission.

What's the size overhead?

Base64 output is 33% larger than input (4 output bytes for every 3 input bytes).