DevTool Desk

Image to Base64 Converter

Drag & drop an image here, or click to browse

Convert an image to a Base64-encoded data URI — handy for embedding small images directly in CSS, HTML, or JSON without a separate file request — or paste a data URI (or raw Base64) back in to preview and download it as an image file.

Frequently asked questions

When should I embed an image as Base64 instead of linking to a file?

It's useful for small, frequently-used images (like icons) where saving an extra HTTP request matters, or in contexts like CSS or JSON where a separate file isn't convenient. For larger images, a regular file reference is usually better — Base64 encoding inflates the size by roughly 33%.

What if I paste Base64 without a data URI prefix?

The decoder will assume it's raw PNG image data and try to preview it that way. If your data is actually a different format (JPEG, WebP, etc.), include the full data:image/...;base64, prefix for an accurate preview.