About Base64
What is Base64?
Base64 turns binary data into plain text using 64 characters -- letters, digits, +, and /. Every 3 bytes of input become 4 characters of output, so encoded strings are roughly 33% larger. The = character pads the end when the input isn't a multiple of 3 bytes.
You'll see it everywhere: data URIs in HTML/CSS, JSON API payloads with binary attachments, HTTP Basic Auth headers, and email MIME encoding. If you've ever seen a string likeiVBORw0KGgo... in source code, that's Base64. It's encoding, not encryption -- anyone can decode it. If you need to protect data, use AES.
Common Use Cases
Data URIs
Embed a small image directly in HTML or CSS without a separate file:data:image/png;base64,iVBORw0KGgo.... Great for icons and tiny images, but large files will bloat your page weight.
API Payloads
Many JSON APIs can't handle raw binary. Base64 lets you send images, files, or protobufs in a text field. Email attachments work the same way -- MIME encodes binary as Base64 so it survives text-based transport.
Authentication
HTTP Basic Auth sends base64(username:password) in the Authorization header. Simple and widely supported, but only safe over HTTPS.
Frequently Asked Questions
Is Base64 the same as encryption?
No. It's a reversible encoding with zero security. Use AES-256 if you need to protect data.
Why does Base64 increase data size?
3 bytes in, 4 characters out -- that's 33% overhead from using only printable ASCII.
Can I encode non-ASCII text like Chinese or emoji?
Yes. The tool converts to UTF-8 bytes first, then encodes. Decoding reverses it.
What does "Invalid Base64 input" mean?
The string has characters outside the Base64 alphabet or wrong padding. Common cause: truncated data from copy-pasting.
This utility is provided for informational purposes only. KnowKit is not responsible for any errors in the output.