img→b64

Image to Base64 Converter

Turn an image into base64 text, or turn base64 back into an image.

Using toolbook means you agree to our Terms and Privacy Policy.

or drag it here

Any image · PNG, JPG, WEBP, or HEIC

Data sent from your device
0 bytes sent

Your files stay on your device

How to use it

Drop an image here to get it as base64 text and a data URI, ready to copy — or paste base64 to turn it back into an image.

Base64 turns an image into plain text, so you can paste it straight into code — HTML, CSS, JSON, or an email — instead of linking to a separate file. Great for small icons.

To convert an image: drop it onto the Image → Base64 tab. You get a data URI (ready to use in HTML or CSS) and the plain base64 text, each with a copy button. Your image isn’t changed in any way.

To go back: paste base64 into the Base64 → Image tab and download the picture. If your text doesn’t start with “data:”, just tell it the image type.

Expect the text to be about a third bigger than the original file — that’s normal for base64.

FAQ

Does it change the image quality?

No. The image is copied exactly, byte for byte.

Why is the base64 text so long?

Base64 is about a third bigger than the original file. That’s the price of turning it into plain text.

My base64 doesn’t start with “data:”. Will it work?

Yes. Paste it into Base64 → Image and choose the image type from the menu.

How it worksFor the curious

Image → Base64 reads the file with the browser’s FileReader API directly into a data URI. There is no canvas re-encoding step, so the bytes are identical to the original.

Base64 represents binary data with 64 printable characters: every 3 bytes become 4 characters, which is the roughly 33% size increase.

Base64 → Image decodes the payload back into bytes and builds a downloadable file. A full data URI carries its MIME type; raw base64 has none, so the type must be chosen.

Related tools