Skip to content
JFIF.IO

Image ↔ Base64 Converter

Encode an image as Base64 text for embedding in code, or paste Base64 to get the image back.

Processed locally in your browser

How to use

  1. 1

    Add an image — or switch to “Base64 → Image” and paste a string.

  2. 2

    Copy the raw Base64, a data URI, a CSS snippet or an HTML tag.

  3. 3

    Or download the decoded image.

Frequently asked questions

When should I use Base64 images?

For very small images (icons under a few KB) inlined in CSS, HTML or emails, to save a request. Base64 is about 33% larger than the binary file, so it is a poor choice for photos.

What is the difference between Base64 and a data URI?

A data URI is Base64 with a prefix such as data:image/png;base64, that tells the browser the file type.

Are my images uploaded?

No. This tool runs entirely in your browser, so your images never leave your device.