Ad · 728x90

Base64 Encoder & Decoder

Encode text or files to Base64, or decode Base64 strings back to text. Supports text, images, and any file — fully client-side.

Base64 Encoder / Decoder

Ad · 336x280

Base64 Encoding Explained

Base64 is an encoding scheme that converts binary data (bytes) into ASCII text characters. It's used to safely transmit binary data through systems that only handle text — like embedding images in CSS/HTML, passing binary data in JSON APIs, or email attachments.

Common Base64 Use Cases

  • Inline images in CSS/HTML: background: url("data:image/png;base64,...") — embed small icons without HTTP requests
  • API authentication: HTTP Basic Auth sends Authorization: Basic base64(username:password)
  • JSON payloads: Embedding binary file data in REST API requests that don't support multipart/form-data
  • JWT tokens: The header and payload sections of JWT tokens are Base64URL-encoded
  • Email attachments: MIME protocol encodes attachments as Base64 in the email body

Base64 vs Encryption

Base64 is encoding, not encryption. Anyone can decode it instantly. Never use Base64 as a security mechanism — it provides zero protection against someone reading the data. It only ensures the binary data survives transmission through text-only channels.

Size Increase

Base64 encoding increases data size by approximately 33%. A 100KB image becomes ~133KB as Base64. This is why you should only inline images as Base64 if they're tiny (under 5KB) — for larger images, an external URL with HTTP caching is much more efficient.

Frequently Asked Questions