Base64 Encode/Decode
EncodingProcessed locally in your browser using the Web Crypto API. Nothing is sent to any server.
How It Works
This tool converts text to and from Base64 encoding using the browser's native
btoa() and atob() functions, with proper UTF-8 support via
TextEncoder/TextDecoder.
How Base64 Works
- Character set:
A-Z,a-z,0-9,+,/(64 characters +=padding) - Encoding ratio: 3 input bytes → 4 output characters (~33% size increase)
- Padding:
=characters are added to ensure the output length is a multiple of 4 - UTF-8 support: This tool correctly handles multi-byte characters (e.g., emoji, CJK characters)
Common Use Cases
- Embedding images in CSS (
data:image/png;base64,...) - Transmitting binary data in JSON or XML
- Encoding credentials in HTTP Basic Authentication headers
- Storing binary data in HTML attributes or data URIs
- Encoding email attachments in MIME format
Frequently Asked Questions
What is Base64 encoding?
Base64 converts binary data into a text string using 64 printable ASCII characters. It is used to safely transport binary data in text-based formats like JSON, XML, or URLs.
Is Base64 encryption?
No. Base64 is encoding, not encryption. It provides zero security — anyone can decode it. Use AES encryption for data protection.
Why is the output longer than the input?
Base64 increases data size by ~33%. Every 3 bytes of input becomes 4 output characters. This is the trade-off for representing binary data as printable text.
Privacy Note
This tool runs entirely in your browser. Your input is never uploaded, stored, or sent to any server.
Disclaimer: This tool is provided for educational and informational purposes only. The results do not constitute professional security advice. Use at your own discretion.