Flowfiles ← Base64 Encoder / Decoder

Image to Base64 Converter

Generate a Data URI ready to embed in HTML and CSS — PNG, JPEG, WebP, GIF, SVG, ICO

Drop your image below to instantly get a Base64 Data URI in the format data:image/png;base64,…. Paste it directly into an HTML src attribute, a CSS background-image rule, or an HTML email. Everything happens in your browser — no image is ever sent to a server.

Need the full tool with every Base64 option?

Open the Base64 tool →
Drop an image here or click to select PNG, JPEG, WebP, GIF, SVG, ICO…

Embedding a Base64 Image in HTML and CSS

Once you have the Data URI copied, you can use it in several ways:

Tip: prefer Base64 for small assets (icons, logos under 5 KB). For large images, an external file is more efficient — Base64 increases file size by ~33%.

Frequently Asked Questions

Which image formats are supported?

All formats supported by your browser: PNG, JPEG, WebP, GIF, SVG, ICO, AVIF, BMP. The Data URI will include the correct MIME type (e.g. data:image/webp;base64,…).

How do I use the Data URI in CSS?

Paste the Data URI in a CSS rule: background-image: url("data:image/png;base64,…");. Extra quotes are optional if the string contains no spaces.

Is my image uploaded to a server?

No. The conversion is done locally by your browser's FileReader API. The image never leaves your device.

Is there a maximum image size?

There is no hard limit, but large images produce very long Data URIs. For images over 100 KB, consider an external file or pre-compressing with our image compressor.

Related Tools