PixelTools

Image ⇄ Base64 converter

Convert an image into a Base64 data URI to inline in HTML or CSS, or decode a Base64 string back into a downloadable image. Fast, free, and private — all in your browser.

Direction
🖼️

Drop images here or click to browse

JPG · PNG · WebP · GIF · BMP · AVIF — processed locally, never uploaded

About Base64 images

Encoding an image as Base64 turns its binary data into plain text you can embed directly in a stylesheet or HTML document as a data URI. This removes a network request, which can speed up loading for tiny assets like icons.

The trade-off: Base64 text is about 33% larger than the original file and can't be cached separately, so reserve it for small images. For photos, keep them as regular files and compress them instead. Curious how formats compare? Read JPEG vs PNG vs WebP.

Frequently asked questions

What is a data URI?

A data URI embeds the file's bytes directly in the URL as Base64 text, so an image can live inside your HTML or CSS with no separate file request.

When should I inline images as Base64?

For very small images — icons, tiny logos, 1px backgrounds — to save an HTTP request. Base64 is ~33% larger than the binary, so it's a bad idea for large images.

Is anything uploaded?

No. Encoding and decoding happen entirely in your browser.