Tools

Home
JSON FormatterSQL FormatterJS ValidatorMinify CSS
Merge PDFCompress PDFImage to PDF
JPG to PNGPNG to WebPCrop Image

Turn Base64 To Image

Paste a Base64 encoded string, decode and display as an image. Auto-detects format, shows dimensions and file size.

Your files never leave your browser

Decoded Image

Decoded image

Paste a Base64 string and instantly see the image it encodes — format, dimensions, and file size included. Works with raw Base64 or full data:image/... URIs, and detects PNG, JPEG, GIF, WebP, BMP, SVG, or ICO from the magic bytes. And everything runs in your browser. Nothing gets uploaded.

How It Works

Paste Base64 String
➔
Decode Binary Data
➔
Render & Download Image

Your browser’s built-in atob() function decodes the Base64 text into raw bytes. Those bytes get wrapped in a Blob and turned into an object URL that an <img> tag can display. The tool reads the first few bytes to identify the file type — PNG starts with 89 50 4E 47, JPEG with FF D8 FF, and so on. No external libraries, no network requests. Just native browser APIs doing the heavy lifting.

Examples

Decoding a thumbnail from an API response

A REST API returns user avatars as Base64 inside JSON. You want to preview what the image looks like before wiring it into your app.

INPUT
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...
OUTPUT
Rendered PNG image 5 × 5 px • 95 bytes

Checking a CSS background-image data URI

You found a data URI buried in a minified CSS file and need to see what the embedded graphic is. Quick paste, instant answer.

INPUT
data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDov...
OUTPUT
Rendered SVG image Auto-detected format: SVG

Recovering an image stored in a database text field

Legacy systems sometimes store images as Base64 text in database columns. You exported a row and got a huge string with no file extension. Paste the raw string (no prefix needed) and the tool figures out if it is a JPEG, PNG, or something else by reading the magic bytes.

INPUT
/9j/4AAQSkZJRgABAQAAAQABAAD/2wBDA...
OUTPUT
Rendered JPEG image 800 × 600 px • 47.2 KB

Who Uses This

👨‍💻 Developers

Previewing Base64 images from API payloads, JWT tokens with embedded thumbnails, or debug logs.

🎨 Designers

Checking inline data URIs from CSS or email HTML templates before sending them out.

📊 QA Engineers

Verifying that image data in test fixtures and mock responses actually renders correctly.

📚 Students

Learning how Base64 encoding works by pasting strings and seeing the visual result instantly.

Common Mistakes

Pasting the data URI prefix twice

If your string already starts with data:image/..., don’t add another prefix. The tool strips it automatically — but a double prefix like data:image/png;base64,data:image/png;base64,... will break decoding. Paste exactly what you have.

Including extra characters around the Base64 string

Some tools wrap Base64 at 76 characters (PEM style). That is fine — whitespace gets trimmed. But if you accidentally paste surrounding JSON quotes, brackets, or other text alongside the data, you will get an invalid character error. Strip those out first.

Pasting Base64 that is not image data

If the encoded data is a PDF, a ZIP, or plain text, the browser can not render it as an image. You will see a broken image icon or an error message. For non-image Base64, use a general-purpose Base64 decoder instead.

Technical Details

Frequently Asked Questions

How do I convert a Base64 string to an image?

Paste the Base64 string into the text box and click Decode. The tool decodes the bytes in your browser and renders the result as a visible image. You can then right-click or hit the download button to save it as a file.

What image formats does Base64 decoding support?

Any format your browser can display. The tool auto-detects PNG, JPEG, GIF, WebP, BMP, SVG, and ICO by reading magic bytes at the start of the decoded data. If you include a data URI prefix, it uses the MIME type from that instead.

Do I need to include the data:image prefix?

Nope. It is optional. If you paste just the raw Base64 characters, the tool decodes them and figures out the format from the binary data. If you do include the prefix, that works too — the tool strips it before decoding.

Is my Base64 data safe? Does it get sent to a server?

Your data stays on your machine. The decoding happens entirely in JavaScript running in your browser — no network requests, no server-side processing, no analytics on your input. Close the tab and it is gone.

Why is the decoded image blank or broken?

Usually the Base64 string is truncated or corrupted. Make sure you copied the full string without cutting it off partway. Also check that there are no stray characters — JSON quotes, brackets, or extra whitespace around the data can cause decoding to fail.

Share: