Image to Base64 & Base64 to Image
Convert images to Base64 strings and decode Base64 back to images. Supports PNG, JPEG, GIF, WebP, SVG, BMP, and ICO. 100% client-side — your images never leave your browser.
Drop images here or click to browse
PNG, JPEG, GIF, WebP, SVG, BMP, ICO — max 5 MB each
What is Base64 Image Encoding?
Base64 image encoding converts binary image data into a text string using the Base64 alphabet (A-Z, a-z, 0-9, +, /). The result is a data URI that can be embedded directly in HTML, CSS, JSON, or email templates without referencing an external file. This is especially useful for small images like icons, logos, and UI elements where eliminating an HTTP request improves page load performance.
When to Use Base64 Images
Base64 encoding is ideal for small images under 10 KB — favicons, SVG icons, tiny thumbnails, and simple graphics. Embedding these directly in your HTML or CSS eliminates extra network requests, which is especially valuable for above-the-fold content. Email templates benefit greatly from Base64 images because many email clients block external image loading by default. Single-file HTML applications and offline-capable tools also rely on embedded images.
Base64 Image Size Considerations
Base64 encoding increases the data size by approximately 33% because every 3 bytes of binary data become 4 Base64 characters. For a 10 KB icon, this means the Base64 string will be about 13.3 KB. For large photographs, this overhead becomes significant and the image cannot be cached separately by the browser. As a rule of thumb, only encode images smaller than 10-20 KB to Base64. For larger images, use standard image URLs so the browser can cache them efficiently. Compressing images before encoding — using JPEG quality reduction or resizing — helps minimize the Base64 string size.
Frequently Asked Questions
Upload or drag an image into the tool. It instantly generates the Base64 string in multiple formats: raw Base64, data URI, HTML img tag, CSS background, Markdown, and JSON. Click Copy to use any format.
Yes. Base64 encoding increases data size by approximately 33% because it represents 3 bytes of binary data as 4 ASCII characters. A 10 KB image becomes about 13.3 KB in Base64.
Yes. Base64-encoded images can be embedded directly in HTML emails using data URIs. This is useful because many email clients block external images by default, but inline Base64 images display immediately.