Base64 Image Encoder

Convert images to base64 data URIs and decode base64 back to images. Supports PNG, JPEG, GIF, SVG, WebP. Get CSS snippets, file info, and instant preview.

Drop an image here or click to browse

PNG, JPEG, GIF, SVG, WebP, ICO (max 50 MB)

What are Data URIs and Base64 Images?

A data URI (data:image/png;base64,...) embeds image data directly into HTML or CSS as a Base64-encoded string, eliminating the need for a separate HTTP request. This is useful for small icons, sprites, and images that you want inlined in your markup or stylesheets. The trade-off is that Base64 encoding increases the data size by approximately 33%, so it is most effective for small images (under 10KB) where the HTTP request overhead outweighs the size increase.

How to Convert Images to Base64

1

Drop an image file onto the upload area, or click to browse. Supports PNG, JPEG, GIF, SVG, and WebP formats.

2

The tool instantly generates the base64 data URI, shows file dimensions, original size, and the base64 size with overhead percentage.

3

Copy the data URI for HTML img tags, or use the generated CSS background snippet directly in your stylesheets.

Frequently Asked Questions

Related Tools