MyWebUtils: Free Online Dev Tools
Base64 Encoder / Decoder
Encode text to Base64 or decode Base64 back to text. Handles UTF-8.
Input
Output
Understanding Base64 Encoding
What is Base64?
Base64 is a widely used encoding scheme that transforms binary data into a text-based format. It represents binary data using only 64 printable ASCII characters, making it a reliable way to transmit data over channels that are designed to handle only text. This ensures that the data remains intact and free from corruption during transport.
Common Uses for Base64
- Embedding Images in HTML/CSS: You can embed an image directly into a web page without needing a separate file request by using a `data:image/png;base64,...` URI. This is useful for small icons or images to reduce HTTP requests.
- Email Attachments: The SMTP protocol, which handles email, was originally designed for text. Base64 is used to encode binary files like images, PDFs, and documents so they can be sent as attachments within an email.
- API Data Transfer: When APIs need to transmit binary data within a JSON or XML payload (which are text-based), the binary data is often Base64 encoded first.
- Basic Data Obfuscation: While not a form of encryption, Base64 encoding makes data unreadable to the casual observer, providing a light layer of obfuscation.
How This Tool Works
- Encode: Converts your standard text (UTF-8) into a Base64 string.
- Decode: Converts a Base64 string back into its original, human-readable text format.
- Security: All encoding and decoding happen directly in your browser. Your data is never sent to a server, ensuring complete privacy.