Image to Base64

Convert an image to a Base64 string for embedding in HTML, CSS, or code. Processed locally, no uploads.

No image selected yet.

How it works

Base64 makes the image about 1/3 larger, so it's best for small icons and simple images embedded in code; for large images, use a direct image link instead. A full Data URL can go straight into an img tag's src or a CSS url().

FAQ

Can I use the output string directly?
Yes. Choose "Full Data URL" to use it as an img src right away; pick "Raw Base64" when you only need the encoding itself.

Is there a size limit?
No hard limit, but Base64 text is about 1/3 larger than the original, so a multi-MB image produces a very long string that's awkward to copy and paste.

Which image formats are supported?
Anything your browser can open: PNG, JPG, WebP, GIF, SVG, and more.

Are my images uploaded?
No. The conversion happens locally in your browser — your images never leave your device.

Related tools

Base64 to Image · Image Format Converter · Image Compressor