Image to Base64 Encoder
Convert any image to a Base64-encoded data URI for embedding directly in HTML, CSS, or JSON
Drop an image here or click to browse
PNG, JPG, WEBP, BMP, GIF
How to Use This Tool
In Encode mode, upload an image to get its Base64 string, Data URI, HTML tag, and CSS code.
Click Copy on any output format to copy it to your clipboard.
Switch to Decode mode to paste a Base64 string or Data URI and preview the image.
Download the decoded image with one click.
About This Tool
Image to Base64 converts any image into a Base64-encoded string, Data URI, HTML <img> tag, or CSS background-image value — ready to paste into your code. The reverse mode decodes Base64 strings back into viewable, downloadable images. File stats show original size, encoded size, dimensions, and format. Best for small images (under 10KB) to reduce HTTP requests. Base64 encoding increases size by about 33%.
Share This Tool
Related Tools
Image Compressor
Compress images up to 90% smaller while maintaining visual quality, perfect for web optimization
Image Resizer
Resize images to exact pixel dimensions or by percentage while preserving aspect ratio and quality
Image Format Converter
Convert images between PNG, JPG, WebP, and BMP formats with quality control and batch support
Image Cropper
Crop images to custom dimensions with a visual drag-and-drop editor and preset aspect ratios