Base64 Image Encoder

Upload an image and get its Base64 data URI — embed directly in HTML, CSS, or JSON

Encode Image
Decode Base64
🖼️

Drop an image here or click to upload

PNG, JPG, GIF, SVG, WebP, BMP, ICO

Frequently Asked Questions

What is a Base64 image encoder?
A Base64 image encoder converts image files into Base64-encoded strings. These strings can be embedded directly in HTML, CSS, or JSON without needing separate image files.
What image formats are supported?
PNG, JPG/JPEG, GIF, SVG, BMP, WebP, and ICO are supported. The encoder auto-detects the MIME type.
What is a data URI?
A data URI is a scheme that allows embedding data directly in documents. For images: data:image/png;base64,iVBORw0KGgo... You can use it in img src, CSS background, etc.
Should I use Base64 images in production?
Base64 images are ~33% larger than the original file. Use them for small icons or when you need a self-contained file. For large images, regular files are better for performance.
How do I use the Base64 output in HTML?
Use the data URI as the src attribute: <img src=\"data:image/png;base64,...\"> or as a CSS background: background-image: url('data:image/png;base64,...')
Is there a file size limit?
The tool works with images up to ~20MB. Very large images may take a few seconds to encode.
Can I paste a Base64 string to decode it?
Yes. Switch to the Decode tab, paste a Base64 data URI or raw Base64 string, and the tool will display the image.
Is my image data sent to a server?
No. All encoding and decoding happens in your browser. Your images never leave your device.