Base64 to image
Decode Base64 or a data URI back into an image file.
A data URI, bare Base64, URL-safe Base64, or an HTML/CSS line that contains one all work.
Runs in your browser. Your file is never uploaded.How we keep your files private
About this tool
Base64 images turn up in API responses, HTML and CSS source, databases, logs, and exported JSON. This decoder turns that text back into a real image file you can open, edit, or attach.
Paste anything that contains the image: a full data URI, bare Base64, URL-safe Base64 that uses - and _, or a whole line of HTML or CSS. The tool finds the Base64 part, decodes it, and shows a preview before you download.
The text is cleaned of spaces and line breaks, URL-safe characters are mapped back, missing padding is restored, and the data is decoded in chunks in this tab. The real file type is read from the decoded bytes, so a mislabelled data URI still downloads with the correct extension, and you are told about the mismatch. Nothing is sent to a server.
How to convert Base64 to an image
- Paste a data URI or Base64 text into the box, or open a .txt file that holds it.
- Optionally type a file name.
- Click Decode image. Pasting into an empty box decodes straight away.
- Check the preview, type and size, then download the image.
Decoded images up to 50 MB are supported. Supported types are PNG, JPG, WebP, GIF, SVG, AVIF, BMP and ICO. Other kinds of files are refused, because the preview could not show them. There is no daily cap.
Base64 to image: popular uses
Base64 to PNG or JPG
Paste the text and download the picture in the format its bytes really are.
Data URI to image
Full data:image/… strings and bare Base64 both work.
Base64 image viewer
Preview the decoded picture before saving, with its type, size and dimensions shown.
FAQ
- Is my Base64 text uploaded?
- No. Decoding happens in your browser, and the image is created in memory in this tab.
- Why do I get 'not valid Base64'?
- The text contains characters Base64 does not use, such as stray quotes, or it was truncated during copying. Copy the complete value again, including the end.
- The data URI says image/jpeg but I got a PNG. Why?
- The tool trusts the bytes, not the label. If the label is wrong, the file is saved with the type it really is, and a note tells you about the mismatch.
- Is it safe to decode an SVG from an unknown source?
- The preview shows the SVG as an image, which cannot run scripts or load other files. Be careful where you open the downloaded SVG later, as some apps treat SVG as a web page.
- Can I decode many images at once?
- Decode one at a time. Each decode replaces the previous result.
Related tools
Continue
More Images tools
- PNG to JPGTurn a PNG into a JPEGPNGJPG
- JPG to PNGTurn a JPEG into a PNGJPGPNG
- Compress imageShrink PNG, JPEG, or WebP images, one or many at onceIMGJPG
- HEIC to JPGTurn a HEIC photo into a JPEGHEICJPG
- WebP to JPGTurn a WebP into a JPEGWebPJPG
- Resize imageChange the pixel size of a PNG, JPEG, or WebPIMGSIZE
- Crop imageCut a region of a JPEG, PNG, or WebPIMGCROP
- JPG to WebPTurn a JPEG into a WebPJPGWebP