Base64 to Image
Paste a Base64 string or Data URI to preview the image and download it as a file โ processed right in your browser.
How to use
- 1Paste a Base64 string or Data URI into the box.
- 2A preview appears straight away, with the format, dimensions and file size.
- 3Click "Download image" to save the file.
Supported formats and limits
- Accepts Data URIs (data:image/โฆ;base64,โฆ), plain Base64, strings with line breaks or spaces, URL-safe Base64 (using "-" and "_") and strings missing the trailing "=". You can also paste a whole HTML or CSS snippet containing a Data URI; the image part is picked out automatically.
- The image format is detected from the data itself: PNG, JPG, GIF, WebP, SVG, BMP, ICO and AVIF. Whether some formats such as AVIF display depends on your browser.
- The download is exactly the decoded data, not recompressed or edited, and is named after its format, for example image.png.
- You get an error if the text is not valid Base64, decodes to something that is not an image, or the image data is cut off.
Privacy
The text is decoded in your browser; what you paste is not sent to a server.
Frequently asked questions
Why does it say the text is not a valid Base64 image?
Usually the string was copied incompletely (missing its start or end), has stray characters mixed in, or holds another kind of file rather than an image. Copy the full string from the source again.
Do I need the "data:image/png;base64," prefix?
No. The format is detected from the data itself, so plain Base64 works too.
Is previewing an SVG safe?
The preview uses an <img> element, and browsers do not run scripts inside an SVG shown this way.
How do I turn an image into Base64?
Use the Image to Base64 tool: choose an image and copy the result as a Data URI, plain Base64, HTML or CSS.
Related tools
- Image to Base64Convert an image to a Base64 string, Data URI, HTML or CSS snippet.
- Image ConverterConvert HEIC to JPG, JPG to PNG, WebP to JPG and more โ between JPG, PNG, WebP, BMP and ICO, one or many at a time.
- Image CompressorReduce JPG/PNG image file size while keeping reasonable quality.
- Remove BackgroundAutomatically remove the background from a photo and save it as a transparent PNG.
Everything runs right in your browser โ files are never uploaded to any server.