Base64 to Image Previewer

Image / Base64

Decode Base64 data strings into live images or encode local image files into Base64 data URIs. Inspect dimensions, file sizes, and download binary images directly.

Base64 String or Data URI
0 characters Base64
Decoded Image & Metadata
Format
-
Dimensions
-
Est. Size
-
(Paste Base64 or upload an image to preview)

About This Tool

Decodes a raw Base64 string or full data URI into a rendered image you can inspect and download, or runs the other direction by reading a local image file into a Base64 data URI. Built for the moment you have Base64 image data (from an API response, database blob, or email attachment) and need to see what it actually is.

It is specifically for images: for encoding or decoding arbitrary text or JSON Base64 strings, use Base64 Converter instead.

Key Features

  • Format auto-detection: Inspects magic-byte prefixes (/9j/ JPEG, R0lGOD GIF, UklGR WebP, <svg SVG) when no data: prefix is given.
  • Metadata panel: Reports Format, pixel Dimensions, and an estimated file size from the Base64 length.
  • Transparency-aware preview: Checkerboard canvas background so PNG/SVG alpha channels are visible.
  • Upload image file: Reads a local image via FileReader straight into the input as a data URI.
  • Copy Data URI & download image: Copy the full data URI string, or save the decoded bytes with the matching file extension.
  • Inline error handling: Invalid Base64 shows a clear error instead of a broken image.

Frequently Asked Questions

Do I need to include the data:image/...;base64, prefix?
No. If you paste a raw Base64 string without a prefix, the tool inspects the leading bytes (for example /9j/ for JPEG, R0lGOD for GIF, UklGR for WebP) to guess the MIME type and builds the data URI for you. A full data URI works too and is used as-is.
Which image formats are supported?
PNG, JPEG, GIF, WebP, and SVG are auto-detected. Any other data:image/... MIME type will still preview as long as the browser can render it.
Can I go the other direction and encode an image to Base64?
Yes. Use "Upload Image File" to pick a local image; it is read as a data URI and dropped into the input box, and "Copy Data URI" copies the full data:image/...;base64,... string.
What happens if the Base64 data is invalid or corrupted?
The preview area shows an error message ("Invalid Base64 image data") instead of a broken image, and no dimensions or size are reported.
Is my image uploaded anywhere?
No. Decoding, format detection, and preview rendering all happen locally in your browser. Nothing is uploaded to a server.