{ Base64 to Image }

// decode base64 strings back to images instantly

Free browser-based Base64 to image decoder. Paste any Base64 data URI or raw Base64 string and instantly preview, inspect, and download the image. No sign-up required.

0 characters
// PASTE BASE64 TO DECODE
⟨/⟩

Paste a Base64 string to begin

Supports data URI and raw Base64 — nothing is uploaded

HOW TO USE

  1. 01
    Paste Base64

    Paste a Base64 data URI (starting with data:image/) or a raw Base64 string. The tool detects the format automatically.

  2. 02
    Click Decode

    The image previews instantly with full transparency support. Image info (dimensions, MIME type, sizes) appears on the left.

  3. 03
    Copy or download

    Use the copy strip to copy the Data URI, raw Base64, CSS, or HTML format. Download the decoded image file directly.

FEATURES

Data URI & Raw Base64 Auto MIME Detection Live Preview Batch Decode 4 Copy Formats Download Image

USE CASES

  • 🔍 Inspect Base64 images in API responses
  • 🐛 Debug embedded images in HTML/CSS
  • 📦 Extract images from JSON payloads
  • 🔄 Convert Base64 back to downloadable files

WHAT IS THIS?

A free browser-based tool to decode Base64 strings back to viewable images. Accepts both full data URIs and raw Base64 strings, auto-detects MIME type from magic bytes, shows full image info, and supports batch decoding of multiple strings. 100% client-side — nothing is sent to any server.

RELATED TOOLS

FREQUENTLY ASKED QUESTIONS

What formats does this tool accept?

This tool accepts two Base64 input formats. A full data URI — starting with data:image/[mime];base64, — provides both the MIME type and the encoded data explicitly. A raw Base64 string — just the encoded data without any prefix — is also accepted; the tool reads the first few bytes after decoding to identify the image format (JPEG, PNG, WebP, GIF, BMP, or ICO) from its magic bytes.

How does automatic MIME type detection work?

When a raw Base64 string is pasted without a data URI prefix, the tool decodes the first 8 characters to get the initial bytes of the file, then compares them against known magic byte signatures: PNG starts with 89 50, JPEG with FF D8, GIF with 47 49, WebP with 52 49 46 46, and BMP with 42 4D. If no signature matches, PNG is assumed as the default.

What is the batch mode?

Batch mode lets you paste multiple Base64 strings at once, separated by blank lines or new lines. Each valid string is decoded independently and shown as a card in a grid layout. You can download each image individually. This is useful when extracting multiple embedded images from a JSON response or HTML source at once.

Why does my decoded image look corrupted?

The most common cause is an incomplete Base64 string — copy-paste truncation is very common with long strings. Ensure you have copied the full string including any padding characters (= or == at the end). Also check that no line breaks have been inserted mid-string, as some tools wrap Base64 output at 76 characters per line. This tool handles multi-line input, but only if each line is a continuation of the same Base64 string with no extra characters between them.

Does this tool send my data to a server?

No. The entire decoding process happens in your browser using native JavaScript's atob() function and the browser's image rendering engine. No input data, no Base64 string, and no decoded image is ever sent to any server. This makes the tool safe for use with sensitive or confidential image data.

What file extension is used when downloading?

The download file extension is determined by the MIME type of the image. A data:image/png URI downloads as .png, data:image/jpeg as .jpg, data:image/webp as .webp, and so on. For raw Base64 strings where the MIME type is guessed from magic bytes, the same mapping applies. The filename is decoded_image plus the appropriate extension.

What Is Base64 Image Decoding?

Base64 is an encoding scheme that converts binary data into a string of printable ASCII characters. When an image is encoded in Base64, its binary pixel data becomes a long text string that can be embedded in HTML, CSS, JSON, or any other text-based format. Decoding reverses this process: the text string is converted back into binary image data that a browser can render.

This tool performs that decoding operation — given a Base64 string, it recovers the original image data and displays it as a viewable, downloadable image file.

Where Do Base64 Images Come From?

Base64-encoded images appear in several common contexts in web development. They are used in CSS to embed small icons and background images without an HTTP request — the style sheet contains the full image data inline. They appear in HTML <img> tags with a src="data:image/..." attribute for the same reason. REST APIs sometimes return image data as Base64 strings in JSON payloads, particularly for dynamically generated content like QR codes, charts, or profile photos. Email templates frequently use Base64 for inline images to ensure they display regardless of whether external image loading is blocked.

Understanding the Base64 Overhead

Base64 encoding increases the size of binary data by approximately 33%. A 10 KB PNG image encoded in Base64 becomes approximately 13.3 KB as a text string. This is because Base64 maps every 3 bytes of binary data to 4 characters (each character representing 6 bits). The info card in this tool shows both the encoded string size and the estimated decoded binary size, along with the overhead percentage — useful for understanding the storage impact of embedding images as Base64.

Debugging Base64 Images in APIs and Code

A common developer workflow is receiving an API response that includes a Base64-encoded image and needing to verify what the image actually looks like. Rather than writing code to decode and save the image, you can paste the Base64 value from your API response directly into this tool and see it rendered immediately. The copy buttons let you quickly get the CSS or HTML version if you need to embed it elsewhere.

☕