Base64 Encoder/Decoder

Encode and decode text, URLs, and data using Base64 encoding

Back to Tools

Operation

File Encoding/Decoding

About Base64 Encoding

What is Base64?

Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It uses 64 printable characters (A-Z, a-z, 0-9, +, /) to encode data.

How it Works

Base64 takes groups of three bytes (24 bits) and converts them into four printable characters. Padding characters (=) are added when the input length is not divisible by 3.

Common Uses

  • Email attachments (MIME)
  • Data URLs in web pages
  • API authentication tokens
  • Storing binary data in text formats
  • Embedding images in CSS/HTML

Base64 Reference

Character Set

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

Size Calculation

Encoded size: ⌈(input_bytes × 4) / 3⌉

Example: 100 bytes → 134 characters

Overhead: ~33% size increase

Important Notes

  • Case-sensitive encoding
  • Whitespace is ignored during decoding
  • Invalid characters cause decode errors
  • Not suitable for encryption/security
  • URL-safe variant uses - and _ instead of + and /