Base64 Encode/Decode
Convert text to Base64 or decode it back instantly.
How to Use
- Type or paste your text in the left box.
- Click "Encode →" to convert to Base64, or paste Base64 in the right box and click "← Decode".
- The result appears instantly in the other box.
- Click "Copy Result" to copy the output to your clipboard.
How It Works
Base64 is a way to "turn binary data into text." Computers store everything as binary (1s and 0s), but some channels (email, web) only handle text. Base64 uses 64 printable characters (A-Z, a-z, 0-9, +, /) to represent binary data — every 3 bytes become 4 characters. The encoded data is about 1/3 larger, but it can pass any data through a text-only channel.
Tips & Tricks
- • Encoded data is about 33% larger than the original — this is normal
- • The = signs at the end are padding, not part of the actual data
- • If you see Chinese characters in Base64 output, it's Chinese text encoded as UTF-8 first, then Base64
FAQ
Is Base64 encryption?
No, it's encoding, not encryption! Anyone can decode Base64 instantly. It just converts data to text format — no secrecy whatsoever. Never use Base64 to protect sensitive information.
Why are there equal signs at the end of Base64?
Base64 encodes every 3 bytes into 4 characters. If the data length isn't a multiple of 3, the last incomplete group is padded with =. Seeing 1 or 2 = signs means the original data length wasn't a multiple of 3.
How do I use Base64-encoded images?
Put them directly in an HTML img tag: \. Great for small icons (under a few KB), but don't use it for large images — it'll make your HTML file enormous.
Real-World Example
Chen was building email templates and couldn't reference external images — email clients block them. He converted the company logo to Base64 and embedded it directly in the HTML. Every email client displayed it perfectly. "One little trick solved the biggest email image headache."