BudiBadu Logo
Toolbadu

Base64 Encode / Decode Tool

Encode text to Base64 or decode Base64 strings back to original text with support for different character encodings.

Text to Encode

Options

Supports text files and binary files

Base64 Output

Encoding not available in this environment

Please use a browser environment

Quick Examples

Base64 Encoding Guide

Understanding Base64 Encoding

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters. It's commonly used to encode binary data for transmission over text-based protocols like email and HTTP. Base64 encoding increases the size of data by approximately 33% but ensures safe transmission through text-only channels.

How Base64 Works

  • Encoding Process: Binary data is divided into 6-bit chunks, each mapped to a Base64 character
  • Padding: Uses = characters to pad data that doesn't align to 4-character boundaries
  • Character Mapping: Each 6-bit value (0-63) maps to a specific ASCII character
  • Size Overhead: 3 bytes of binary data become 4 Base64 characters (~33% increase)

Character Set

A-Z: Uppercase letters (positions 0-25)
a-z: Lowercase letters (positions 26-51)
0-9: Digits (positions 52-61)
+/: Standard symbols (positions 62-63)
=: Padding character (not part of encoding alphabet)

Common Use Cases

  • Email attachments and MIME encoding
  • Data URLs for embedding images in HTML/CSS
  • JSON Web Tokens (JWT) and authentication
  • Basic HTTP Authentication headers
  • Storing binary data in text databases (JSON, XML)
  • API response encoding and data transmission
  • Configuration files and environment variables
  • Image and file embedding in web applications

Base64 Variants

Standard Base64: Uses +/ symbols and = padding (RFC 4648)
URL Safe Base64: Uses -_ instead of +/ for URL compatibility
No Padding: Removes = characters for cleaner URLs and compact encoding
MIME Format: Adds line breaks every 76 characters for email compatibility

Request a Feature

Have an idea to improve this tool? Share your suggestions and help us make it better! (One request per day)

0/1000 characters