Small PNG icon
Upload a 32×32 PNG icon that's 236 bytes, and the data URI comes out as data:image/png;base64,iVBORw0KG... at 338 characters — base64 makes the data about a third bigger.
Convert images to Base64 data URIs for HTML and CSS, or decode Base64 to image — free.
About
Converts an image file into a Base64 data URI you can paste into HTML or CSS, or decodes one back into a preview.
Developers use it to inline small icons or logos directly into HTML or CSS without an extra network request, while anyone debugging a data URI can paste it back in to check what image it actually decodes to. It's one of many free image tools on Toolapt, and like every tool here, it's free to use with no sign-up and no limit on how many times you run it.
Examples
3 worked examples
Upload a 32×32 PNG icon that's 236 bytes, and the data URI comes out as data:image/png;base64,iVBORw0KG... at 338 characters — base64 makes the data about a third bigger.
Upload an 800×600 JPEG that's 103 KB, and the data URI comes out as data:image/jpeg;base64,/9j/... at 141,043 characters, about 138 KB of text.
Paste a data:image/jpeg;base64,... string into the lower box and click Preview to render the 800×600 image it represents — right-click the preview to save it as a file.
FAQ
Quick answers to common questions about the Image to Base64 Converter.
It converts an image file into a Base64-encoded data URI you can paste directly into HTML or CSS, and can also decode a data URI back into a preview image.
Yes. It's free, with no sign-up, no watermark and no limit on how many times you use it.
Yes. The image you upload, and any data URI you paste in, are processed entirely on your own device using your browser's built-in FileReader API — nothing is sent to a server.
A data URI embeds the image's bytes directly in your HTML or CSS, so the browser doesn't need a separate request to load it — handy for very small icons or fully self-contained email templates, though it makes the surrounding file larger.
No. Base64 encoding is lossless — it just re-represents the exact same bytes as text. The image itself is identical before and after.
Paste it into the lower box and click Preview to see the image — right-click (or long-press on mobile) the preview to save it as a file.
Yes. The page is fully responsive and works on mobile, tablet and desktop browsers alike.
Very large images produce a very long data URI, which is normal — Base64 encoding makes text about a third larger than the original binary file.
Did Image to Base64 Converter work for you?