99+ Free Tools
← Back to all tools

Image to Base64

Turn a small image into a Base64 data URI you can paste into HTML or CSS. Nothing is uploaded or stored.

A small photo print next to a laptop showing code
Base64 makes a file about 33% larger, so it only suits small images — files over 5 MB are not accepted.

Choose an image

Drop an image here, or tap to choose

JPG, PNG, WebP or GIF, up to 5 MB.

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.