Toolhaus

Image to Base64

Convert an image to a Base64 data URI, or decode a data URI back to an image.

Turn an image into a Base64 data URI you can paste straight into HTML or CSS — handy for inlining small icons. Copy the URI, an <img> tag, or a CSS background snippet. You can also paste a data URI to preview and download the image. Runs in your browser, nothing is uploaded.

Drop an image here, or

To encode, choose an image and copy its full data URI, CSS background rule, or HTML image tag. To decode, switch tabs and paste a complete data:image/...;base64,... URI to preview and download the file. A data URI includes the MIME type and grows roughly one third larger than the original binary, so use it mainly for small assets.

Frequently asked questions

When should I inline images as Base64?

Base64 works well for tiny icons to save a request, but it inflates size by ~33% — avoid it for large images.

Privacy

All processing happens locally in your browser. Your data is never uploaded.

Read the practical guide for this category.

Related tools