Encode any image as a Base64 data URI. Output as data URI, CSS, HTML, or raw Base64. Copy or download as text.

Drop an image to encode as Base64
JPG, PNG, WebP, GIF - any image format
or paste an image with Ctrl+V / ⌘V
Your image is processed locally. Nothing is uploaded.
Upload your image
Drop any image onto the tool - JPG, PNG, WebP, GIF, BMP, or SVG.
Choose output format
Select "Data URI" for embed use, "Base64 only" for raw encoding, "CSS background-image" for stylesheet use, or "HTML img src" for direct HTML embedding.
Copy or download
Click Copy to copy the encoded string to the clipboard, or download it as a .txt file.
Base64 encoding converts an image into a text string that can be inserted directly into an HTML, CSS, or JavaScript file. This eliminates a separate network request for that image - instead of the browser fetching the image file, it decodes the data from the markup it already has. For small UI elements like icons, separators, and decorative patterns, this reduces page load requests without a meaningful file size penalty.
HTML email templates use Base64 images to ensure they render correctly in environments that block external image loading by default. Many corporate email clients disable external images for security. Embedding images as Base64 in the HTML source means they display regardless of those restrictions, making them reliable for email design. To reverse the process and extract an image from a Base64 string, use the Base64 to image decoder.
Base64 encoding increases file size by approximately 33% compared to the binary original. For large images, this trades an HTTP request for significantly more data to parse and load. The correct use case is small images - icons, simple backgrounds, dividers - typically under 5 KB, where the request savings outweigh the size increase. For anything larger, serving the image as a separate file is more efficient. Compressing the image first before encoding reduces the Base64 string length proportionally.
Base64 to Image
Decode a Base64 string back to an image file
Image Metadata
View EXIF metadata from any image - camera model, ISO, shutter speed, GPS and more
Convert to PNG
Convert JPG, WebP, GIF, BMP and SVG images to PNG format with transparency support
Compress Image
Compress JPG, PNG, WebP and GIF images