Tools95

CONVERT / A PRACTICAL IMAGE GUIDE

How to convert Base64 to an image

Recover the original picture from a Base64 string or an image data URL.

Paste the encoded data into Base64 to Image, select Continue, check the picture and download it in its original format. This example decodes the sample PNG without resizing or recompressing it.

Follow the guide
ENCODED DATA AND ITS RECOVERED IMAGE
Before
data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAgAAAAIACAYAAAD0eNT6AAAQAElEQVR4Aez9T+x/+1Xehz7rZ0Jv/iiiXEWM2kFQRonUiAwQqmp1lKhCKKpQRh3cFBJsAyYYAjY2mHOOoYE29rEZkD…

Beginning of the sample image data URL; excerpt shortened for display.

After Original PNG orbit icon recovered from the Base64 data URL.

Decoded PNG: 512 × 512 pixels, 202,491 original bytes.

A complete image data URL decodes back to the original PNG. The displayed text is shortened; the sample uses the full string.
Advertisements
QUICK VIDEO TUTORIAL How to convert Base64 code into an image Paste a Base64 image or data URL, preview the decoded picture, choose Start and download the image in its original format. English narration Watch the video

How to convert Base64 code into an image

Advertisements

Follow this example to turn encoded image data back into a usable file. Open Base64 to Image.

01

Paste the image data

Open Base64 to Image and paste a plain Base64 string or a complete image data URL. Try a sample fills the same field with a real PNG example. You do not need to upload a separate file.

A data URL includes a prefix such as data:image/png;base64,. Plain Base64 contains just the encoded characters. Whitespace and line breaks inside the data are ignored.

If your code is inside an HTML image or CSS declaration, copy only the data URL. The full HTML element or CSS declaration cannot be decoded as an image.

Use Image to Base64 Converter when you need to go in the other direction.

02

Check the preview before exporting

Select Continue. The converter checks the Base64 characters, image file signature, any declared MIME type and whether the browser can open the result.

A data URL declaring JPG while containing PNG bytes is rejected. Incomplete text, unsupported files and files above the limits are also rejected. This avoids silently saving a misleading file extension.

The example uses the favicon-orbit.png sample, a 512 × 512 PNG containing 202,491 bytes. Its preview should show the same colorful icon artwork. If you change the pasted code in the editor, select Preview image to check the replacement.

The preview helps identify the image. Do not rely on a filename or a declared MIME type alone.

The example in this guide

Try a sample to fill the data URL for favicon-orbit.png. Select Continue, confirm the 512 × 512 preview, then Start and Download. Compare the downloaded PNG bytes with the source sample.

Decoded format
PNG
Image dimensions
512 × 512 px
Original image bytes
202,491 bytes
Conversion
Decoding without recompression
03

Download the recovered image

Select Start, then Download to save decoded-image.png for this example. The converter detects the original format; it does not ask you to choose a different one.

Decoding restores the original bytes. It does not resize, redraw or recompress the image, and it preserves existing metadata and GIF animation. Use another image tool after downloading if you want to resize, compress or convert the result.

The downloaded sample has the same 202,491 bytes as its source PNG. The short data URL excerpt shown here is only for illustration; a truncated string will not produce the full image.

Download the result before refreshing the page, which starts a new workflow.

04

Know the formats, limits and privacy boundary

PNG, JPG, WebP, GIF, BMP and AVIF are supported when the browser can decode them for preview. A decoded image can be up to 25 MB, 60 megapixels and 16,000 pixels per side. The text input also has a bounded length. SVG markup and arbitrary binary files are not supported.

The pasted data is decoded and previewed on your device without being uploaded for conversion. Base64 is not encryption: anybody with the complete string can reconstruct the image.

Keep a private image’s encoded text private as well.

USEFUL DETAILS

Common questions

How do I convert Base64 to an image?

Paste a plain Base64 string or image data URL, select Continue, check the preview, then select Start and Download.

Can I paste a complete HTML image tag?

Use only the data URL inside its src attribute. A complete HTML element or CSS declaration is not accepted.

Will the picture lose quality?

No. Decoding recovers the original image bytes without resizing or recompression.

Can I choose JPG instead of PNG?

This tool restores the encoded file in its original format. Use an image converter afterward to change formats.

Why is my data URL rejected?

The data may be incomplete, exceed a limit, contain an unsupported format or declare a MIME type that does not match the actual image.

Is the Base64 data uploaded?

No. The converter decodes and previews the image locally in your browser.

YOUR TURN

Recover the picture, confirm it and save its original file.

Try a sample or use your own file, and review the result before sharing.

Open Base64 to Image

Image detail

Language38

English العربية Français Italiano Deutsch Español Português Nederlands Русский Türkçe 日本語 中文 हिन्दी Bahasa Indonesia Bahasa Melayu 한국어 Tiếng Việt ไทย Polski Svenska Українська Norsk বাংলা Ελληνικά فارسی اردو Čeština Dansk Magyar Română Suomi Български Filipino ქართული Slovenčina Azərbaycanca עברית Slovenščina

Choose your language. Video tutorials currently use English narration.