Base64 Image Converter

Base64 input

Paste a Base64 string or a full data URL. You can also load an image file.

Preview

Decoded image preview will appear here.
MIME type
Size

FAQ

What can this tool do?

  • Convert image files into Base64 Data URLs.
  • Decode Base64 strings and preview images.
  • Support pasting full data URLs such as data:image/...;base64,...
  • Upload local image files for automatic conversion.
  • Download decoded images locally.

Which image formats are supported?

  • PNG (image/png)
  • JPEG / JPG (image/jpeg)
  • GIF (image/gif)
  • WebP (image/webp)
  • BMP (image/bmp)
  • SVG (image/svg+xml)
  • Both raw Base64 data and full Data URLs are supported.

Does it support URL Safe Base64?

Yes. The tool supports both standard Base64 and URL Safe Base64 formats (where '-' and '_' replace '+' and '/').

Is the data:image prefix required?

No. You can paste a raw Base64 string directly, or a full Data URL such as data:image/png;base64,... The tool will automatically detect the image type and generate a standard Data URL.

Are there any file size limits?

Yes, limits are applied mainly to protect browser performance:

  • Base64 input max ~20MB (encoded string length limit).
  • SVG content max ~5MB (to prevent heavy XML parsing).
  • Uploaded image files max ~15MB.

If limits are exceeded, the tool will show an error and stop processing.

Why is Base64 format invalid?

  • The input is not valid Base64.
  • The string is truncated or incomplete.
  • It contains invalid characters.
  • The input is not image-encoded data.

Why can’t the image format be recognized?

  • Base64 decoding succeeded, but the content is not a supported image format.
  • File header does not match the declared MIME type.
  • Image data is corrupted or incomplete.
  • Supported formats are PNG / JPEG / GIF / WebP / BMP / SVG only.

Can I download the decoded image?

Yes. Click the 'Download Image' button to save it locally. The system will automatically generate the correct file extension based on the MIME type.

Why does Base64 encoding increase size?

Base64 converts every 3 bytes of data into 4 printable characters, increasing the size by approximately 33%. This is a normal characteristic of Base64 encoding.

What is Base64 image conversion used for?

  • Embedding images in HTML/CSS.
  • Transferring images via JSON or APIs.
  • Embedding images in offline or email scenarios.

What is the difference between Data URL and Base64?

  • Base64 is an encoding method.
  • Data URL is a data representation format.
  • Data URL = MIME type + Base64 data.

Example: data:image/png;base64,...

Is my image uploaded to a server?

No. All processing (reading, encoding, decoding, and previewing) happens locally in your browser. Images are never uploaded or sent to any server, making it safe for sensitive content.