Image to Base64
Turn a small image into a Base64 data URI you can paste into HTML or CSS. Nothing is uploaded or stored.
Choose an image
Drop an image here, or tap to choose
Choose an image.
Result
Choose an image and press Convert.
How this tool works
Local only. The image is read in your browser and encoded to Base64. No file is uploaded, stored or shared.
Byte-for-byte. The output encodes the original file exactly — decoding it reproduces the original file byte-for-byte.
Size. Base64 makes a file about 33% larger. That is why the tool only accepts files up to 5 MB and why data URIs suit small images such as logos, not large photos.
Line split. The 76-character split is the MIME style used in emails. A data URI with line breaks inside it does not work in code — remove the breaks before pasting one into HTML or CSS.