What Is Base64?
Base64 encodes arbitrary binary or text data using 64 printable ASCII characters (A?밵, a?뱙, 0??, + and /). It increases size by ~33% (4 output chars per 3 input bytes) but produces output that survives email, JSON, URLs, and other text-only transports.
When to Use It
- Inline images in HTML/CSS ??
background:url(data:image/png;base64,??avoids a separate HTTP request. Best for icons under ~5 KB. - JWT / OAuth tokens ??typically URL-safe Base64.
- Email attachments ??MIME uses Base64 internally.
- Storing binary in JSON ??when you can't use a binary format like CBOR or MessagePack.
Standard vs URL-safe Base64
Standard Base64 uses +, /, and trailing = padding. URL-safe Base64 (RFC 4648 짠5) substitutes - and _, and usually omits padding ??so the encoded value can sit in a URL or filename without further encoding. This tool accepts both during decoding.