Input

Output

Enter Base64 and click Convert

Base64 to Image Examples

Paste a Data URI or raw Base64 to decode and view the image. Example:

SVG Data URI

Paste this into the editor above and click Convert—it renders a simple "Sample" image:

Sample Data URI

Use Sample above to load the same data into the editor.

What Is Base64 to Image?

Base64 to Image converts a Base64-encoded string into a viewable image. Base64 is defined by RFC 4648 and is commonly used to embed images in HTML, CSS, JSON, or XML. When you have a Base64 string (e.g., from an API response, database, or Data URI) and need to see or save the image, this tool decodes it and displays the result.

This tool runs entirely in your browser. It uses the atob() function to decode the Base64 string and creates a Data URI for the image. Nothing is sent to a server. You can paste raw Base64, a full Data URI (data:image/png;base64,...), or upload a file. For the reverse—converting an image file to Base64—use Image to Base64.

How to Use This Tool

1

Paste or Upload

Paste your Base64 string into the left editor or click Upload to load a .txt or .b64 file. The tool accepts raw Base64 (e.g., iVBORw0KGgo...) or full Data URIs. Use Sample to load an example and see the result.

2

View the Image

The right panel displays the decoded image. Supported formats include PNG, JPEG, GIF, WebP, and SVG. Invalid Base64 or non-image data will show an error. The tool auto-detects the format from the Data URI or by inspecting the binary header.

3

Download

Use Download to save the image as a file. The file extension is inferred from the image format. For encoding images to Base64 (e.g., for embedding in HTML), use Image to Base64. For decoding any Base64 to text or binary, use Base64 Decoder.

How It Works

The tool extracts the Base64 payload from your input. If you paste a Data URI like data:image/png;base64,iVBORw0KGgo..., it parses the MIME type and Base64 data. For raw Base64, it assumes PNG by default but detects JPEG, GIF, WebP, and SVG from the binary signature. The atob() function decodes the string to binary, which is then converted to a Data URI and displayed in an <img> element.

Data URIs are defined in RFC 2397 and supported by all modern browsers. They allow embedding images directly in HTML or CSS without separate files. When APIs return Base64 image strings (e.g., in JSON), this tool lets you preview and download them.

Where Base64 to Image Helps

API responses often include profile pictures, avatars, or product images as Base64 strings. Pasting them here gives you an instant preview and lets you save the file. Database exports may store images as Base64—this tool helps you recover and view them. When debugging, you might find Base64 image strings in logs or configs; decoding here reveals what the image actually is.

Email HTML sometimes embeds images as Base64. Extracting the Base64 and decoding here lets you save the attachment. For creating Base64 from your own images (e.g., for inline CSS backgrounds or HTML <img src="data:...">), use Image to Base64. For encoding or decoding general text and files, use Base64 Encoder or Base64 Decoder.

Frequently Asked Questions

Is my data private?

Yes. Decoding runs entirely in your browser. No data is sent to any server. You can confirm this by opening your browser's Network tab while using the tool.

What image formats are supported?

PNG, JPEG, GIF, WebP, and SVG. The tool detects the format from the Data URI or from the binary header (magic bytes). Unsupported formats will show an error or may not display correctly.

Can I use a Data URI directly?

Yes. Paste the full Data URI (e.g., data:image/png;base64,iVBORw0KGgo...) and the tool will extract and decode the Base64 portion. This is useful when copying from HTML or CSS.

What if the image doesn't display?

Check that the Base64 string is valid (only A–Z, a–z, 0–9, +, /, and =). Remove spaces and newlines. If it's from JSON, ensure you're pasting the raw string value, not the escaped version. Try the Base64 Decoder to verify the data decodes correctly.

What's the size limit?

Large images (e.g., several MB) may slow down the browser. The tool has a 10 MB limit for input. For very large Base64 strings, consider decoding with a command-line tool and opening the file locally.

Related Tools

For the Base64 specification, see RFC 4648. MDN's Data URIs guide covers embedding. atob() decodes Base64 in JavaScript.