- Why would I base64-encode an image?
- Embed directly in HTML/CSS without a separate file request. Useful for tiny icons, small avatars, and data URIs in emails.
- What's the size penalty?
- Base64 adds ~33% to file size. Worth it for small images (<2KB) to save an HTTP request; costly for large ones.
- Does it work for all image types?
- PNG, JPEG, WebP, GIF, SVG. The data URI includes the correct MIME type prefix so browsers render it correctly.
- Can I decode back?
- Yes — paste a data: URL and download the original image. Round-trip is lossless for all formats.