Image to Base64

Drag and drop or select an image file to get the Base64 string and the full data: URL ready to embed in HTML, CSS, or JSON. Supports PNG, JPEG, GIF, WebP, SVG and more. Everything runs in your browser — files are never uploaded.

Browser-local No signup required Encode / Decode

Turn a selected image into Base64 text locally, preview the image, and copy either the raw Base64 payload or the complete data URL created by the browser.

How to convert an image to Base64

  1. Choose or drop an image file into the tool.
  2. Wait for FileReader to create a data URL and preview the image.
  3. Copy the raw Base64 text or copy the complete data URL depending on your use case.

Output details

The main text area removes the data URL prefix and displays only the Base64 payload. A separate action copies the complete data URL including the MIME prefix.

Base64 is an encoding, not compression or encryption, and the encoded text is normally larger than the original binary data.

Privacy and limitations

The image is read with FileReader in your browser and is not uploaded by this tool. Large files create large text strings and may use considerable browser memory.

Image to Base64 FAQ

Does it include the data URL prefix?

The main output does not, but a separate button copies the full data URL.

Can I drag and drop an image?

Yes.

Does Base64 compress the image?

No.

Does it encrypt the image?

No. Base64 is only an encoding.

Is the image uploaded?

No. It stays in the browser.