Image Base64 Encode
Convert images to Base64 strings in bulk
Convert up to 20 image files at once
What is Image Base64 Encode?
Image Base64 Encode converts image files into Base64 text. Output the result in a form that can be embedded in HTML or CSS, so small images can sit directly in the page.
You can convert several images at once, and images are processed in your browser.
How to Use
- Add image files by selecting them or dragging and dropping them.
- Choose the output format and copy the result to use it.
Added images are appended to the existing results, and up to 20 images can be converted in total. Each result lets you compare the original file size with the size after Base64 encoding.
Supported Formats
PNG, JPEG, GIF, WebP, BMP, ICO, AVIF, and SVG are supported.
Main Settings
Output Format
Each result can be output in a different form. Switch it to match where you paste the result.
- Data URL: Starts with
data:image/...;base64,and works as an image as-is, for example as an img src - Raw: Only the Base64 string without the declaration, for APIs and custom processing
- HTML img: Output as
<img src="..." />— paste it into HTML and the image shows up - CSS: Output as
background-image: url("...")— paste it into a stylesheet
Use Cases
- Embedding a small icon or logo into HTML — with the HTML img output, there is no need to write the tag by hand
- Pointing a CSS background at image data without a separate file — the CSS output works as the background-image value as-is
- Handling image data as text in an API or JSON — the Raw output gives you the Base64 body without the declaration
- Shipping one HTML file with its images embedded, without separate image files
Frequently Asked Questions
Does Base64 make the file larger?
Yes. Base64 represents the data with about 1.33 times as many characters, so the output is larger than the original file.
Can I convert a large image?
Yes, but when the output exceeds 100,000 characters, only the beginning is shown. Use copy to get the full text.
Last updated:

