Image to Base64

Convert any image into a Base64 data URI string ready to paste in your code

Select Your Image

or drag and drop it here

Supported formats: JPG, PNG, WEBP, GIF, SVG

The Base64 string will appear here…

What is the Fastols Image to Base64 Converter?

This tool converts any image into Base64 text in the form of a Data URI ready to paste directly into code, with a preview of the image before copying.

The tool also offers copying the text ready as a CSS "background-image" property directly.

Encoded in Your Browser

Your image is converted to a Base64 string locally, never uploaded to a server.

Instant Code Output

Get the ready-to-use Base64 string the moment you drop in an image.

Free, No File Limit

Encode as many images as you need without signing up.

How to Convert an Image to Base64

Frequently Asked Questions about Converting Images to Base64

In what format does this tool's result appear?

The result appears as a full Data URI starting with "data:image/..." that can be pasted directly into the src attribute of an img element or into CSS code.

What's the difference between the two available copy buttons in the tool?

The first button copies the Base64 text alone, ready to paste anywhere, while the second button copies the same text ready as a full CSS property in the form "background-image: url(...);".

Is there a restriction on the image format accepted by this tool?

The tool accepts any file the browser recognizes as an image, meaning its type starts with image/, with no restriction to a specific format.

Can more than one image be processed at the same time?

No, the tool currently processes one image at a time.

Is the image uploaded to any server to convert it?

No, the image is read and converted to Base64 text entirely within the browser.

Want to go deeper?

Image to Base64: A Free Complete Online Guide

Read the full guide