How to use Base64 to Image
- 1. Paste Base64. Include or omit the `data:image/…;base64,` prefix — both work.
- 2. Preview. PNG, JPEG, WebP, GIF, SVG, ICO, and AVIF when detected.
- 3. Download. Save with the correct extension.
About this tool
“Base 64 to image” is the reverse of image-to-Base64: recover a picture from an encoded string in emails, APIs, or CSS.
Data URI paste
If you copied a full `data:image/png;base64,…` value, paste it as-is. The decoder strips the header automatically.
Code examples
Node
Buffer.from("hello").toString("base64");
Buffer.from(b64, "base64").toString("utf8");Browser (UTF-8 safe)
btoa(unescape(encodeURIComponent(text)));
decodeURIComponent(escape(atob(b64)));Python
import base64
base64.b64encode(b"hello").decode() # aGVsbG8=
base64.b64decode("aGVsbG8=").decode()Data URI
const uri = `data:image/png;base64,${b64}`;
// <img src={uri} /> or CSS url('${uri}')