Base64 Image and HTML Converter

Convert images to Base64 for HTML embedding, or restore images from Base64 data in HTML.

Base64 Image

Base64 image and HTML tool

Convert a local image into a Data URL for img, CSS background-image, or inline HTML, or extract data:image Base64 images from img elements. Processing happens in the browser and is useful for frontend development, email templates, offline pages, prototypes, and API debugging.

Image to Data URL

Choose or drop an image file. A 20 MB limit helps avoid excessive browser memory use.

Extract from HTML

Parse img elements and list data:image sources with thumbnails, alt text, and lengths.

Multiple output formats

Copy a Data URL, HTML img tag, or CSS background declaration without manual concatenation errors.

Steps

  1. Choose or drop an image in image mode, or paste HTML containing img elements in extraction mode.
  2. Select Data URL, img tag, or CSS format in image mode; click Extract images in HTML mode.
  3. Copy the result for frontend code or download a text file for long Base64 strings.

FAQ

Is Base64 smaller than the original file?

Usually no. Base64 turns binary data into text and normally increases size, so it is best for small icons, emails, and limited inline assets rather than many large images.

Are my images uploaded?

Image reading, Base64 conversion, and preview happen in the browser. The conversion does not upload the file.

Recommended utilities

You may also need these file utilities