🌐 EN

🖼️ Base64 Image Converter

Encode an image as Base64 text or preview an image from Base64 text.

📁
Click or drag & drop an image

Inputs and checks

  • On Encode, choose or drop an image file to see a preview and read-only Base64 text.
  • Include Prefix is checked initially; set it before selecting the file to choose a full data URI or raw Base64.
  • Use Copy for the encoded text; changing Include Prefix after reading does not update that text.
  • On Decode, paste raw Base64 or a base64 image data URI and press Decode.

Reading the result

  • Raw Base64 is treated as PNG data when decoding; an accepted string may still fail to display if its bytes are not an image.
  • Download uses the filename image.png even when the underlying image data is another format; it does not resize or convert image bytes.

Examples

Encode a one-pixel PNG

Input
In the Decode tab, paste the exact data URI shown in this example’s result, decode it, and click Download to save the PNG. Switch to Encode, check Include Prefix before selecting that downloaded file.
Result
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGP4z8DwHwAFAAH/iZk9HQAAAABJRU5ErkJggg==
How to check it
The selected PNG bytes are encoded in Base64 and prefixed with their image MIME type.

Decode the same PNG text

Input
Paste iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR4nGP4z8DwHwAFAAH/iZk9HQAAAABJRU5ErkJggg== into Decode.
Result
The image preview is 1 by 1 pixel and Download appears.
How to check it
The raw text receives the data:image/png;base64, prefix.

Frequently asked questions

Does this tool shrink image files?
No. Base64 changes how the same file data is written as text.
Why is the filename always image.png?
Decode downloads under that name even if the original data represents a JPEG.
Can I paste an image URL?
No. Decode expects Base64 text, not a remote image URL.