Base64 Encode
Encode text to Base64
Frequently Asked Questions
What is Base64 encoding used for?
Base64 encodes binary data as ASCII text for safe transmission through text-only channels. Common uses: embedding images in CSS/HTML (data URIs), encoding email attachments (MIME), transmitting binary data in JSON APIs, and storing binary in XML.
How do I encode text to Base64?
Paste your text and click Encode. "Hello World" becomes SGVsbG8gV29ybGQ=. The = padding at the end ensures the output length is a multiple of 4 characters. The encoder handles UTF-8 text correctly.
Can I encode files and images to Base64?
Yes. Upload any file and the encoder converts it to a Base64 string. For images, it also generates the complete data URI (data:image/png;base64,...) ready to paste into HTML or CSS.
How much larger is Base64 encoded data?
Base64 increases data size by approximately 33%. A 3-byte input becomes 4 Base64 characters. A 100KB image becomes about 133KB when Base64 encoded. Consider this overhead when embedding large files.
Is Base64 encoding done locally in my browser?
Yes. All encoding happens entirely in your browser using JavaScript. No data is sent to any server. This ensures privacy for sensitive content like API keys, tokens, or personal documents.