Base64 Encoder/Decoder

Encode text to Base64 or decode Base64 strings

About this Tool

The Base64 Encoder/Decoder converts text to Base64 encoding and back. Base64 is a binary-to-text encoding scheme that represents binary data in an ASCII string format. It's commonly used for encoding data in emails, URLs, and data transfer where binary data needs to be transmitted over text-based protocols.

Common Use Cases

Email Attachments

Email protocols like SMTP were designed for text. Base64 encoding allows binary files (images, documents) to be sent as text in email attachments.

Data URLs

Embed small images or files directly in HTML or CSS using Base64 data URLs, reducing HTTP requests and simplifying deployment.

API Authentication

Many APIs use Base64 encoding for Basic Authentication headers, encoding username:password combinations.

Data Storage

Store binary data in JSON, XML, or databases that only handle text, such as embedding images in JSON API responses.

Pro Tips

  • !

    Not Encryption

    Base64 is encoding, not encryption. It doesn't provide security—anyone can decode it. Never use Base64 alone for sensitive data.

  • !

    Size Increase

    Base64 encoding increases data size by about 33%. Original 100 bytes becomes approximately 133 bytes encoded.

  • !

    URL Safety

    Standard Base64 uses +, /, and = which aren't URL-safe. For URLs, use URL-safe Base64 variants that replace these characters.

  • !

    Line Breaks

    Some Base64 implementations add line breaks every 76 characters. This tool doesn't add line breaks, providing compact output.

Frequently Asked Questions