Base64 Image Encoder & Decoder
Convert image files to Base64 data URIs, HTML img tags, CSS background images, and JSON strings. Preview Base64 images back instantly.
Select an image to generate Base64 output.
Base64 Image Formats
A Base64 image is usually shipped as a data URI: data:image/png;base64,.... HTML can use that string directly in an img src attribute, CSS can use it inside url(), and JSON APIs can store it as a string when a small inline asset is more practical than a separate file.
Performance Notes
Base64 adds roughly 33% size overhead, so it works best for small icons, placeholders, SVGs, and email-safe embedded images. For product images, screenshots, and large photos, keep the original image file and optimize it separately.
Frequently Asked Questions
Does this upload my image?
No. The conversion uses the browser FileReader API, so the selected image is read locally and is not sent to a server.
When should I use Base64 images?
Base64 data URIs are useful for small icons, email templates, prototypes, and single-file demos. Larger images should usually stay as separate image files.
Why is the Base64 output larger?
Base64 represents binary data as text, so output is usually about one third larger than the original image bytes.