About Base64 Encoding
Base64 is an encoding scheme that converts binary data into ASCII text using 64 printable characters (A-Z, a-z, 0-9, +, /). It's essential for transmitting binary data over text-based protocols like email, JSON, or XML. While Base64 increases data size by about 33%, it ensures binary data can safely travel through systems designed for text.
The encoding works by taking 3 bytes (24 bits) of input and converting them into 4 Base64 characters (6 bits each). When the input isn't divisible by 3, padding characters (=) are added. URL-safe Base64 replaces + with - and / with _ to avoid issues in URLs and filenames, making it perfect for tokens, identifiers, and query parameters.
Common Use Cases
Base64 is everywhere: embedding images in HTML/CSS (data URLs), encoding email attachments (MIME), transmitting JSON Web Tokens (JWT), storing binary data in databases, encoding API credentials, and handling file uploads. It's not encryption—anyone can decode it—but it prevents data corruption during transmission.
Enter any text to encode it to Base64, or paste Base64 to decode it back to plain text. Toggle URL-safe mode for web-friendly encoding. The tool automatically detects whether your input is plain text or Base64 and processes it accordingly. All operations happen locally in your browser for privacy.