◈

Base64 to Image

Convert base64 to image using the available input and format options.

Choose a file or fill the fields, then click Create image.

About Base64 to Image

Base64 images turn up in API responses, database exports, HTML source and browser developer tools. Reading the text tells you nothing about the picture. This tool decodes the string so you can see the image and save it as a normal file, which helps developers debugging an API or anyone recovering an embedded graphic.

How it works

Paste either a full data URL such as data:image/jpeg;base64,... or a raw Base64 string. If the text does not start with data:, the tool adds a data:image/png;base64, prefix. The browser decodes it as an image, draws it on a canvas and exports from-base64.png, showing a preview and the pixel size. Output is always PNG, whatever the source format. If the string is cut off, contains stray characters, or is not image data, you see an Invalid Base64 image message. Decoding happens locally.

How to use Base64 to Image

  1. Enter the text or data in the format shown in the text box above (Paste a data URL or raw Base64 string).
  2. Select “Create image” and check the result before copying or downloading it.

Worked example

Paste a data URL copied from an HTML email that starts data:image/jpeg;base64,/9j/4AAQSkZJRg and describes a 600x200 banner. The preview shows the banner, and the result line reads from-base64.png with its size in KB and 600x200. Click Download to save the PNG.

Tips for a better result

  • If a raw string fails to load, add the matching prefix yourself, such as data:image/jpeg;base64, for JPEG data or data:image/gif;base64, for GIF.
  • Strip quotes, commas and JSON field names around the value. Only the data URL or the Base64 characters should be in the box.
  • Line breaks inside long strings copied from email source can break decoding. Remove them if you get an error.

Frequently asked questions

How do I know what format the data was?

Look at the prefix, such as image/png or image/svg+xml. Raw strings often reveal it too: JPEG data usually starts with /9j/ and PNG data with iVBOR. The download is PNG in every case.

Why do I get an Invalid Base64 image error?

The string may be incomplete, contain extra characters, be non-image data such as a PDF, or carry the wrong type prefix. Copy the full value again and check the start and end.

Can it decode a PDF or other file from Base64?

No. It only renders images the browser can display. A Base64-encoded PDF or ZIP will fail, because the decoded bytes are loaded as an image.

What to check

Conversion can change image quality, dimensions, format support or metadata. Keep the original file.

Read the Privacy Policy for information about local processing, connected services and advertising.