How to use Image to Base64 Converter
- Choose an image.
- Copy the data URL, HTML tag or CSS snippet.
- Paste it into your page or stylesheet.
About this tool
A data URL stores the whole file inside a string, so it needs no separate request. It is useful for small icons, email templates and single-file pages. Base64 makes the data about 33% larger, so keep it for images under a few kilobytes and use normal files for anything bigger.
The snippets include a data URL, an HTML <img> tag and a CSS background-image rule.
Frequently Asked Questions
- Is Base64 good for performance?
- Only for very small images. Large inline images slow down page parsing and cannot be cached separately.
- How do I turn Base64 back into an image?
- Use the Base64 to image converter.
Related tools
- Base64 to Image ConverterDecode Base64 text back into an image file.
- Base64 Encoder and DecoderConvert text to Base64 and back without breaking non-English characters.
- Rotate and Flip ImagesFix sideways photos or mirror an image in seconds.
- PNG to JPEG ConverterConvert PNG images to JPEG in your browser. Your files stay on your device.
- PNG to WEBP ConverterConvert PNG images to WEBP in your browser. Your files stay on your device.
- PNG to BMP ConverterConvert PNG images to BMP in your browser. Your files stay on your device.