Convert images to Base64 Data URIs and back, with drag-and-drop and preview
Base64 image conversion turns an image file into a Base64-encoded Data URI string. A Data URI embeds image data directly inside HTML or CSS, in the format data:image/png;base64,....
Common uses for Base64 images include reducing HTTP requests (inlining small images into HTML), embedding CSS background images, inserting images into emails, and referencing images in Markdown.
This tool works both ways: convert an image file to a Base64 Data URI, or turn a Base64 Data URI back into an image and download it. Everything runs in your browser.
background-image: url(data:image/png;base64,...). This tool provides a "Copy CSS background" button that generates ready-to-paste CSS code in one click.