Base64 to image

Paste Base64 text (with or without the data: prefix) to see the image and download it with the right file extension.

Decoded image

Private by design: your image is opened, edited and saved by your own browser with the Canvas API. It is never uploaded to a server, and the page keeps working offline once loaded.

How the type is detected

The decoder reads the first bytes of the decoded data, the “magic number”, instead of trusting the prefix:

FormatFirst bytesBase64 starts with
PNG89 50 4E 47iVBORw0KGgo
JPEGFF D8 FF/9j/
GIF47 49 46 38R0lGOD
WebP52 49 46 46 … 57 45 42 50UklGR
BMP42 4DQk
SVG<svg or <?xmlPHN2Zy or PD94bWw

URL-safe Base64 (with - and _) and missing padding are fixed automatically.

Frequently asked questions

Why does it say the Base64 is invalid?
Usually the string was cut off when copying, or it contains other text. Copy the full value, starting after “base64,”.
Is the decoded image uploaded?
No, decoding uses your browser’s built-in atob function.