WebToolKitHub

Base64 Encode / Decode

Encode text or files to Base64 and decode Base64 back to text or download as file.

You can encode or decode text directly, or upload a file below.

Understanding Base64 Encoding

Base64 is an encoding scheme that converts binary data into ASCII text format. It's commonly used to safely transmit data over text-based protocols and embed binary data in text formats.

Key Features

  • Text-safe binary transmission
  • File and text encoding support
  • Real-time encoding/decoding
  • Character set selection
  • Line break options

Common Use Cases

  • Email attachments
  • Embedding images in HTML/CSS
  • Data URI schemes
  • API authentication
  • Configuration files

Base64 Variants

Standard Base64

Uses A-Z, a-z, 0-9, +, and / characters. Safe for most applications but + and / may need escaping in URLs.

URL-Safe Base64

Replaces + with - and / with _. Ideal for URLs and filenames without requiring escaping.

MIME Base64

Adds line breaks every 76 characters. Used in email and MIME messages for compatibility.

Performance Considerations

Base64 increases data size by ~33%. Use only when necessary for text-based transmission.