Image to Base64
Encode an image as Base64 or a ready-to-paste data URI.
Processed in your browser · No uploads
Drop your image here
or click to browse files
Supports: PNG, JPG, JPEG, JFIF, WebP, AVIF, HEIC, BMP, GIF, TIFF and ICO
Files stay on your device
About this tool
Base64 turns binary image data into plain text so it can be embedded directly in HTML, CSS, JSON or email templates. ImgFlow encodes the file exactly as it is — no re-compression — and detects the correct MIME type from the file contents.
Base64 makes data about 33% larger, so it is best for small images such as icons and placeholders.
How to use the Image to Base64
- 1Choose an image.
- 2Pick plain Base64 or a full data URI.
- 3Copy the result, or copy a ready-made HTML/CSS snippet.
- 4Download as a .txt file if you prefer.
Frequently asked questions
Base64 represents every 3 bytes with 4 text characters, so the output is about 33% larger than the file.
No. The encoding is done by your browser’s FileReader API on your device.
Related tools
- Base64 to ImageDecode Base64 text or a data URI back into a downloadable image.
- Compress ImagesShrink images for the web with real, measured savings — and nothing ever leaves your device.
- Favicon GeneratorCreate every favicon size your website needs from a single image.
- Image ConverterConvert one image or a whole batch between PNG, JPG, WebP, AVIF and more — privately, in your browser.