Image Tools

Base64 to Image Converter: Decode Base64 and Data URLs

Paste Base64 text or a data URL to turn it back into an image. The tool recognises the image type from the data itself, shows a preview and lets you download the file. Whole HTML img tags and CSS rules work too; the data URL inside is found for you.

01

Your inputs

Start with the example, or enter your own values.

Processed in your browser. Your inputs stay on this device.

02

Your result

A little clarity, coming right up.

Make room for the answer.

Enter your values and run the tool. Your result will appear here.

How to use the Base64 to Image Converter

Fill in the fields above and the result appears straight away. Everything runs in your browser, so nothing you type is uploaded.

Read more: How to Use the Base64 to Image Converter: Steps and a Worked Example

How it works

The text is decoded from Base64 back to bytes; the image type is recognised from the first bytes of the file, not from the label in the data URL

Examples

  • With the default values
    Image type: PNG
    Dimensions: 2 × 2 px
    Decoded size: 77 bytes

Limitations and assumptions

Up to 25 MB once decoded. Plain Base64, URL-safe Base64, data URLs and HTML or CSS that contain a data URL all work. Supported types: PNG, JPG, GIF, WebP, SVG, BMP, ICO, TIFF, AVIF and HEIC; some of these may not preview in every browser.

Frequently asked questions

Do I need the data:image/png;base64, part?

No. Plain Base64 works, and so do data URLs and URL-safe Base64. The image type is read from the decoded bytes, so a wrong or missing label does not matter.

Why does it say the Base64 is not valid?

Usually part of the text was not copied, or extra characters such as quotes or spaces inside the data were included. Copy the whole value again; line breaks are fine.

Is the pasted text sent anywhere?

No. The decoding happens in your browser.