ToolBunny LogoToolBunny
Back to Homepage
Image to Base64 Encoder / Decoder

Convert images to Base64 or Base64 to images.

About This Tool

This tool provides a dual function for handling images and Base64 data. The encoder converts an image file into a Base64 data URI, which is a text string that can be directly embedded in HTML or CSS, reducing the number of HTTP requests a browser needs to make. The decoder does the reverse, taking a Base64 data URI and converting it back into a viewable and downloadable image. It's an essential utility for web developers looking to optimize web performance or handle image data as text.

How to Use

To Encode (Image to Base64):

  1. Select the "Encode" tab.
  2. Click the "Click to upload an Image" area to select an image from your device.
  3. Once uploaded, a preview of your image will appear on the left, and the generated Base64 string will appear on the right.
  4. Click "Copy Base64 String" to copy the text to your clipboard.

To Decode (Base64 to Image):

  1. Select the "Decode" tab.
  2. Paste a valid Base64 data URI (it must start with `data:image/...`) into the textarea.
  3. Click the "Decode String" button.
  4. A preview of the decoded image will appear below.
  5. Click "Download Image" to save the image to your device.