Base64 Encode / Decode
Encode text to Base64 or decode Base64 back to text.
What Is Base64 Encoding?
Base64 is a way of representing binary data (or any text) using only 64 printable ASCII characters. It's commonly used to safely embed data — like images or files — inside text-based formats such as JSON, HTML, XML, or email, where raw binary data could break the format or get corrupted in transit.
How to Use This Base64 Tool
- Paste text into the input box to encode it to Base64, or paste Base64 to decode it back to readable text.
- Click "Encode" or "Decode" depending on what you need.
- Click "Copy Output" to copy the result.
Common Uses for Base64
Embedding Images in CSS/HTML
Small images can be Base64-encoded and embedded directly into CSS or HTML using a data URI, avoiding an extra HTTP request for tiny icons or logos.
API Authentication
Basic HTTP authentication encodes the username and password combination in Base64 before sending it in a request header.
Email Attachments
Email protocols were originally designed for text, so binary attachments are Base64-encoded to travel safely through the email system.
Storing Binary Data as Text
Databases or APIs that only accept text fields sometimes store binary data (like small files) as a Base64 string.
Frequently Asked Questions
Is Base64 encryption?
No — Base64 is encoding, not encryption. It's easily reversible by anyone and provides no security or confidentiality; it's purely a format conversion.
Is my data sent to your server?
No, encoding and decoding happen entirely in your browser using JavaScript.