Base64 Encoder/Decoder - Base64 Encoding and Decoding
Encode your texts to secure Base64 format or decode Base64 code
Input Text
Output Result
0
Input Length0
Output Length0%
Size ChangeEncode
Current ModeUsage Examples
Image Encoding
Convert image files to Base64 format for web pages.
data:image/png;base64,iVBORw0K...
API Token Encoding
Securely encode API keys and tokens.
YXBpX2tleV8xMjM0NTY3ODkwYWJjZG...
Email Content
Encode email attachments in Base64 format.
SGVsbG8gV29ybGQh...
Features
Real-time Processing
Encodes or decodes your text as you type
Bidirectional
Both encoding and decoding operations
Size Statistics
Compare input and output sizes
File Download
Download results as files
How to Use?
Select Mode
Choose encoding or decoding mode.
Enter Text
Enter the text to encode or Base64 code to decode.
Get Result
Result is automatically calculated and displayed.
Copy or Download
Copy the result or download it as a file.
Frequently Asked Questions
Need to Embed an Image in an Email Template?
Need to embed an image in an email template? Or decode that weird string from an API response? Base64 converts binary data to plain ASCII text using 64 characters (A-Z, a-z, 0-9, + and /). Every 3 bytes of input become 4 characters of output. The result is a string that can safely travel through any system that handles text, no corruption, no data loss.
Where You Actually Run Into Base64
Data URIs let you inline small images directly in HTML or CSS with data:image/png;base64,... which saves an HTTP request. Email attachments use Base64 via MIME to safely encode binary files for SMTP. HTTP Basic Auth sends credentials as Authorization: Basic dXNlcjpwYXNz. JWTs encode their header and payload as Base64url. And canvas.toDataURL() spits out Base64 every time you export an image from the Canvas API.
Base64 Is Not Encryption. Seriously.
This trips up a lot of beginners. Base64 is encoding, not encryption. Anyone can decode it in milliseconds without any key. If you see a Base64 string in a config file or URL, it provides zero security. It is just a format conversion. For actual data protection, use AES-256 or TLS. Base64 is for making binary data text-safe, nothing more.
The 33% Size Tax
Base64 always makes data about 33% bigger because 3 input bytes become 4 output characters. For tiny icons under 2-5KB, that overhead is worth it because you eliminate an HTTP request. For anything bigger, serve it as a separate file with proper cache headers. The break-even point depends on your setup, but as a rule of thumb: if the image is over 5KB, do not inline it.
Encode and Decode Right Here
Paste text or upload a file up to 10MB. Results appear as you type. You get stats showing input length, output length, and the exact size change. Copy to clipboard or download as a file. Everything runs in your browser, nothing touches a server.